title: OnTouchListener return value
body: <p>I'm trying to understand full the <code>OnTouchListener</code>, but I have some doubts.</p>
  
  <p>I have this xml code:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/container"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  tools:context="com.example.pablo.MainActivity"
  tools:ignore="MergeRootFrame" &gt;
  
  &lt;Button
      android:id="@+id/button1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Button" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>And I have implemented this code i java:</p>
  
  <pre><code>public class MainActivity extends Activity {
  
  Button b;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      b = (Button)findViewById(R.id.button1);
  
      b.setOnTouchListener(new OnTouchListener() {
          @Override
          public boolean onTouch(View arg0, MotionEvent arg1) {
  
              switch (arg1.getAction()) {
              case MotionEvent.ACTION_DOWN:
                  Toast.makeText(getBaseContext(), "boton down",Toast.LENGTH_SHORT).show();
                  break;
              case MotionEvent.ACTION_UP:
                  Toast.makeText(getBaseContext(), "boton up",Toast.LENGTH_SHORT).show();
                  break;
              }
              return false;
          }
      });
  
     }
   }
  </code></pre>
  
  <p>I have read when I return false in <code>ACTION_DOWN</code>, the rest of the gesture (<code>MOVE</code> and <code>UP</code>) doesn't work. But it works in this code, the "up" message is shown on screen, and it shouldn't. So I don't understand completely what is the meaning of the return value in the <code>OnTouch</code> event.</p>
  
  <p>Can somebody helps me?</p>