6

question above. For me getPointerCount() is always 1, once a double tap is detected.

 private GestureDetector mGestureDetector;
 mGestureDetector = new GestureDetector(this, new MyGestureListener());    

...

 public boolean onTouch(View v, MotionEvent event) {
     return mGestureDetector.onTouchEvent(event);
 }  

...

private class MyGestureListener extends  GestureDetector.SimpleOnGestureListener {

    @Override
    public boolean onDoubleTap(MotionEvent e) {
         return super.onDoubleTap(e);
    } 

}
decades
  • 827
  • 17
  • 25

1 Answers1

3

The GestureDetector is only capable of detecting "one finger" gestures. The "double tap" gesture you are currently listening to, occurs when the user tapped, released and tapped again the screen with one of his/her fingers.

If you want to listen to gestures with multiple fingers you'll have to do it on your own or use the ScaleGestureDetector (only for the scale gesture).

Cyril Mottier
  • 1,614
  • 1
  • 12
  • 10