Android: 如何知道确认的单击结束?
Android: How can I know a confirmed single tap has ended?
我想知道确认的单击何时结束。 GestureDetector.SimpleOnGestureListener
中的 onSingleTapUp
出现在 onSingleTapConfirmed
之前。我如何知道确认的单击是否已完成?
onSingleTapConfirmed() 是 您对单击已完成的置信度检查。链接的 javadoc 将帮助您理解 onSingleTapUp():
之间的区别
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.
换句话说,此时您可以确定下一次触地不会开始双击,因为它超过了延迟 Android 允许的两次点击之间的延迟完全双击。
我想知道确认的单击何时结束。 GestureDetector.SimpleOnGestureListener
中的 onSingleTapUp
出现在 onSingleTapConfirmed
之前。我如何知道确认的单击是否已完成?
onSingleTapConfirmed() 是 您对单击已完成的置信度检查。链接的 javadoc 将帮助您理解 onSingleTapUp():
之间的区别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.
换句话说,此时您可以确定下一次触地不会开始双击,因为它超过了延迟 Android 允许的两次点击之间的延迟完全双击。