Eddie Eddie - 13 days ago 5
Android Question

What is the difference between onDoubleTap listener and onDoubleTapEvent listener

I am pretty new in Android, and recently learned about gestures!

What is the difference between 2 of these methods?

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


And this one

@Override
public boolean onDoubleTapEvent(MotionEvent e) {
return false;
}


They seem to do the same thing. Which one do you use, and what is the difference

Answer

simple answer will be

 boolean onDoubleTap (MotionEvent e) 

you can Notifi when a double-tap happens and param motionEvent is forThe down motion event of the first tap.

  boolean onDoubleTapEvent (MotionEvent e)`

you can Notifi an event within a double-tap gesture occurs, including the down, move, and up events and and param motionEvent is for the The motion event

so with doubleTapEvent you can get additional tab gestures along with the tap