view raw
Eddie Eddie - 5 months ago 65
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?

public boolean onDoubleTap(MotionEvent e) {
return false;

And this one

public boolean onDoubleTapEvent(MotionEvent e) {
return false;

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


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