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!