Note that there are some explanatory texts on larger screens.

plurals
  1. POThe static field View.GONE should be accessed in a static way
    text
    copied!<p>There is an error in this condition <code>if((detail.VISIBLE) &amp;&amp; (pod.GONE) &amp;&amp; (photo.GONE))</code> that "The static field <code>View.GONE</code> should be accessed in a static way"</p> <p>...</p> <pre><code>public boolean onScroll(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { final RelativeLayout detail = (RelativeLayout) findViewById(R.id.layout_detail); final RelativeLayout photo = (RelativeLayout) findViewById(R.id.layout_detail_photo); final RelativeLayout pod = (RelativeLayout) findViewById(R.id.layout_detail_pod); final ToggleButton btn_detail = (ToggleButton) findViewById(R.id.btn_detail); final ToggleButton btn_pod = (ToggleButton) findViewById(R.id.btn_pod); final ToggleButton btn_photo = (ToggleButton) findViewById(R.id.btn_photo); // right to left swipe if (e1.getX() - e2.getX() &gt; SWIPE_MIN_DISTANCE &amp;&amp; Math.abs(velocityX) &gt; SWIPE_THRESHOLD_VELOCITY) { Toast.makeText(this, "Left Swipe", Toast.LENGTH_SHORT).show(); if((detail.VISIBLE) &amp;&amp; (pod.GONE) &amp;&amp; (photo.GONE)) { detail.setVisibility(View.GONE); photo.setVisibility(View.GONE); pod.setVisibility(View.VISIBLE); btn_photo.setSelected(false); btn_pod.setSelected(true); btn_detail.setSelected(false); } } // left to right swipe else if (e2.getY() - e1.getY() &gt; SWIPE_MIN_DISTANCE &amp;&amp; Math.abs(velocityX) &gt; SWIPE_THRESHOLD_VELOCITY) { Toast.makeText(this, "Right Swipe", Toast.LENGTH_SHORT).show(); } return true; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload