onSingleTapConfirmed 和 onSingleTapUp 的区别
Difference between onSingleTapConfirmed and onSingleTapUp
onSingleTapConfirmed
和GestureDetector.SimpleOnGestureListener
中的onSingleTapUp
有什么区别?以下哪一项与 onClick
方法相似?
根据 GestureDetector.SimpleOnGestureListener
文档,
onSingleTapConfirmed
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.
onSingleTapUp
Notified when a tap occurs with the up MotionEvent that triggered it.
我认为 onClick
方法类似于 onSingleTapConfirmed
。
onSingleTapUp()
回调将在点击手势发生并触发它的向上动作时发生,而onSingleTapConfirmed()
将在检测到的点击手势被系统确认为单击时发生而不是双击手势的一部分。
onSingleTapConfirmed
和GestureDetector.SimpleOnGestureListener
中的onSingleTapUp
有什么区别?以下哪一项与 onClick
方法相似?
根据 GestureDetector.SimpleOnGestureListener
文档,
onSingleTapConfirmed
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.
onSingleTapUp
Notified when a tap occurs with the up MotionEvent that triggered it.
我认为 onClick
方法类似于 onSingleTapConfirmed
。
onSingleTapUp()
回调将在点击手势发生并触发它的向上动作时发生,而onSingleTapConfirmed()
将在检测到的点击手势被系统确认为单击时发生而不是双击手势的一部分。