title: Android - How to handle two finger touch
body: <p>The documentation say this about that:</p>
  
  <blockquote>
    <p>A gesture starts with a motion event with ACTION_DOWN that provides
    the location of the first pointer down. As each additional pointer
    that goes down or up, the framework will generate a motion event with
    ACTION_POINTER_DOWN or ACTION_POINTER_UP accordingly.</p>
  </blockquote>
  
  <p>So i have done the override of onTouchEvent function in my activity:</p>
  
  <pre><code>@Override
  public boolean onTouchEvent(MotionEvent MEvent) 
  {
  
      motionaction = MEvent.getAction();
  
      if(motionaction == MotionEvent.ACTION_DOWN)
      {
          System.out.println("DEBUG MESSAGE POINTER1 " + MEvent.getActionIndex() );
      }
  
      if(motionaction == MotionEvent.ACTION_POINTER_DOWN)
      {
          System.out.println("DEBUG MESSAGE POINTER2 "  + MEvent.getActionIndex() );
      }
  
  }
  </code></pre>
  
  <p>Unfortunately the second if is never entered. The activity contains 2 view with 2 <strong>OnTouchListener</strong>, i know that <strong>onTouchEvent</strong> is called only if the view of the activity don't consume the event so i tried to return false in the listener and in that way i can recognize only the first finger touch but this avoid the listener to receive the ACTION_UP event and don't allow me to recognize the second finger touch. I also tried to return true in the listener but after manually invoke the onTouchEvent function but this allow me to recognize only the first finger touch too.  </p>
  
  <p>What's wrong in my code ?</p>