to top
Android APIs
Added in API level 3
public static interface

GestureDetector.OnDoubleTapListener

android.view.GestureDetector.OnDoubleTapListener
Known Indirect Subclasses

Class Overview

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

Summary

Public Methods

? Examples
abstract boolean onDoubleTap( MotionEvent e)
Notified when a double-tap occurs.

? Examples
abstract boolean onDoubleTapEvent( MotionEvent e)
Notified when an event within a double-tap gesture occurs, including the down, move, and up events.

? Examples
abstract boolean onSingleTapConfirmed( MotionEvent e)
Notified when a single-tap occurs.

Public Methods

public abstract boolean onDoubleTap (MotionEvent e)

Added in API level 3

Notified when a double-tap occurs.

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

public abstract boolean onDoubleTapEvent (MotionEvent e)

Added in API level 3

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

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

public abstract boolean onSingleTapConfirmed (MotionEvent e)

Added in API level 3

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 The down motion event of the single-tap.
Returns
  • true if the event is consumed, else false
No examples for this method.
Frequently called with: [Clear]
Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. The original page is available here.