Display a menu with buttons on Overlay click

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Display a menu with buttons on Overlay click

Postby alfand » Mon Sep 07, 2009 5:47 pm

Hello,
I'm trying to display a menu when I click an Overlay in a customized MapView; I need a button on my menu, and what I have done till now was MANUALLY drawing the frame and the button (as an inner rectangle). To check when the button is tapped I explicitly check the x and y positions in my onTouchEvent method (the menu inherits from Overlay). I've managed to do this and the result is in the attachment.
Now, I would like to paint the button orange when the user clicks on it, but I've noticed it doesn't work with quick taps. What I do is I check if the click is inside the button area and I set a bool to show that the draw() method should draw the button area orange.
Does anybody have an idea on how to solve this? Probably I should use XML layouts, but right now I'm quite interested on how I could make this work...
Thank you for your attention, cheers!
Attachments
map.png
map.png (146.82 KiB) Viewed 237 times
alfand
Freshman
Freshman
 
Posts: 2
Joined: Sat Sep 05, 2009 1:06 pm

Top

Postby burakkilic » Mon Oct 05, 2009 7:28 am

Hi. I am adding TableLayout at the runtime( onTap() event of the ItemizedOverlay) First, design the things that you will show. Then save them in an xml. And use Layout inflater to populate your design in the map.
burakkilic
Developer
Developer
 
Posts: 37
Joined: Thu Oct 01, 2009 10:24 am

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 5 guests