Skip to content

Most visited

Recently visited

navigation
Added in API level 3

GestureDetector.OnDoubleTapListener

public static interface GestureDetector.OnDoubleTapListener

android.view.GestureDetector.OnDoubleTapListener
Known Indirect Subclasses


The listener that is used to notify when a double-tap or a confirmed single-tap occur.

Summary

Public methods

abstract boolean onDoubleTap(MotionEvent e)

Notified when a double-tap occurs.

abstract boolean onDoubleTapEvent(MotionEvent e)

Notified when an event within a double-tap gesture occurs, including the down, move, and up events.

abstract boolean onSingleTapConfirmed(MotionEvent e)

Notified when a single-tap occurs.

Public methods

onDoubleTap

Added in API level 3
boolean onDoubleTap (MotionEvent e)

Notified when a double-tap occurs.

Parameters
e MotionEvent: The down motion event of the first tap of the double-tap.
Returns
boolean true if the event is consumed, else false

onDoubleTapEvent

Added in API level 3
boolean onDoubleTapEvent (MotionEvent e)

Notified when an event within a double-tap gesture occurs, including the down, move, and up events.

Parameters
e MotionEvent: The motion event that occurred during the double-tap gesture.
Returns
boolean true if the event is consumed, else false

onSingleTapConfirmed

Added in API level 3
boolean onSingleTapConfirmed (MotionEvent e)

Notified when a single-tap occurs.

Unlike onSingleTapUp(MotionEvent), this will only be called after the detector is confident that the user's first tap is not followed by a second tap leading to a double-tap gesture.

Parameters
e MotionEvent: The down motion event of the single-tap.
Returns
boolean true if the event is consumed, else false
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.