在 Android 上同时触摸 MapView 和 Button

发布于 2024-09-11 10:41:54 字数 632 浏览 1 评论 0原文

我创建了一个 MapActivity,其中包含一个 MapView 和 MapView 顶部的一个按钮。

像这样:

替代文本 http://desmond.yfrog.com/Himg9/scaled.php?tn=0&ser​​ver=9&filename=devicef.png&xsize=640&ysize=640

我想要用户用一根手指触摸mapView的一个点,然后用另一根手指触摸“添加地点”按钮(MapView仍然由第一根手指推动)。

问题是当第一个手指触摸mapView时,就像mapView获得焦点一样。 因此,当第二根手指触摸“添加地点”按钮时,它会被识别为第二根手指触摸了放置“添加地点”按钮的位置的地图视图

我有一台带有 Froyo 的 Nexus One,因此它应该支持多点触控...

您认为我应该怎么做才能使多点触控在这种情况下工作?!?

感谢您的帮助!!!! :)

I created a MapActivity that contains a MapView and a Button on the top of the MapView.

Like this:

alt text http://desmond.yfrog.com/Himg9/scaled.php?tn=0&server=9&filename=devicef.png&xsize=640&ysize=640

I would like that the user touch a point of the mapView with a finger and then touch the button "Add Place" with another finger (the MapView is still pushed by the first finger).

The problem is when the first finger touch the mapView, it is like if the mapView gains the focus.
So when the second finger touch the button "Add Place" it is recognized as the second finger touched the mapView in the location where it is placed the button "Add Place"

I have a Nexus One with Froyo and so it should support multi-touch...

What do you think should I do to make multi-touch working in this context?!?

THANKS FOR YOUR HELP!!!! :)

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

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

发布评论

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

评论(1

渡你暖光 2024-09-18 10:41:54

多点触控在 Nexus One 上不可用,由于 Apple 的一项专利 关于此功能。
因此,除非您的用户root了他们的手机,否则这是不可能的。
但是,您无需多点触控即可执行您的想法。只要在你的mapView上添加一个clickListener,然后弹出一个AlertDialog来提供“添加地点”的机会(如果他愿意的话)?

Multitouch is not available on the Nexus One, because of a patent from Apple on this feature.
So unless your users root their phone, this won't be possible.
However, you can execute your idea without multitouch. Just add a clickListener on your mapView, and pop up an AlertDialog to offer the opportunity to "Add a place" if he wants?

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