如何在 android 中检测事件双击

发布于 2024-12-25 09:02:44 字数 36 浏览 1 评论 0原文

如何检测 android 中位置 (x,y) 的事件双击?

How can I detect event double tap in position (x,y) in android?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

难忘№最初的完美 2025-01-01 09:02:44

使用 GestureDetector 并通过 setOnDoubleTapListener(..)

Use GestureDetector and register for double-tap events via setOnDoubleTapListener(..).

掩饰不了的爱 2025-01-01 09:02:44

我认为使用手势检测器类并覆盖 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文