如何在 android 中检测事件双击
如何检测 android 中位置 (x,y) 的事件双击?
How can I detect event double tap in position (x,y) in android?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
如何检测 android 中位置 (x,y) 的事件双击?
How can I detect event double tap in position (x,y) in android?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
您可以使用 onDoubleTapListener: http://developer.android.com/reference/ android/view/GestureDetector.OnDoubleTapListener.html
You can use onDoubleTapListener: http://developer.android.com/reference/android/view/GestureDetector.OnDoubleTapListener.html
使用
GestureDetector
并通过setOnDoubleTapListener(..)
。Use
GestureDetector
and register for double-tap events viasetOnDoubleTapListener(..)
.我认为使用手势检测器类并覆盖 onDoubleTap(MotionEvent e) 应该可以。
从 MotionEvent 获取 x 和 y 坐标。
I think using gesture detector class and overriding onDoubleTap(MotionEvent e) should work.
Get the x and y coordinates from the MotionEvent.