How to detect doubletap on a View? [duplicate] How to detect doubletap on a View? [duplicate] android android

How to detect doubletap on a View? [duplicate]


Your view needs to implement the onTouchEvent() method, and that method needs to pass the event along to the onTouchEvent() method of the GestureDetector object.

@Overridepublic boolean onTouchEvent(MotionEvent event) {    Log.v(DEBUG_TAG,"OnTouchEvent !!!");    boolean result = gestureScanner.onTouchEvent(event);//return the double tap events    return result;}