views:

166

answers:

2

Hey there!!

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

Like this:

alt text

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!!!! :)

A: 

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?

Sephy
THanks a lot Sephy!! :)
Giorgio
According to the article Apple's patent covers gestures, including pinch to zoom. This gesture is included in the maps application so that article is incorrect and so is this answer.
Austyn Mahoney
A: 

Would you please tell me how you added the button to the mapview?

AboulEinein
I don't think u can actually put a Button inside of the mapView!Instead you can create a Relative Layout and put inside the button and the mapView in the way that the button covers the mapView
Giorgio
Thanks! I already figured it out :)
AboulEinein