开发者

Touching both a MapView and a Button on Android

开发者 https://www.devze.com 2023-01-08 19:09 出处:网络
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&x

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 开发者_如何学Pythonin this context?!?

THANKS FOR YOUR HELP!!!! :)


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消