Most visited

Recently visited

Added in API level 3

GestureDetector.OnDoubleTapListener

public static interface GestureDetector.OnDoubleTapListener

android.view.GestureDetector.OnDoubleTapListener
Known Indirect Subclasses


用于在发生双击或确认单击时发出通知的收听者。

Summary

Public methods

abstract boolean onDoubleTap(MotionEvent e)

发生双击时通知。

abstract boolean onDoubleTapEvent(MotionEvent e)

当发生双击手势中的事件(包括向下,向上和向上事件)时通知。

abstract boolean onSingleTapConfirmed(MotionEvent e)

单击时发出通知。

Public methods

onDoubleTap

Added in API level 3
boolean onDoubleTap (MotionEvent e)

发生双击时通知。

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)

当发生双击手势中的事件(包括向下,向上和向上事件)时通知。

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)

单击时发出通知。

onSingleTapUp(MotionEvent)不同的 onSingleTapUp(MotionEvent) ,只有在检测器确信用户的第一次敲击没有跟随第二次敲击而导致双击手势之后,才会调用它。

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

Hooray!