Adding buttons to map infowindow android
In the new Google Maps for Android API v2, I can very easily get custom markers and info windows to display. However, I’m trying to have multiple buttons inside of my info window, that each perform a different
onClick action but the problem is, the map treats the InfoWindow as it’s own button object (no matter where I click on the InfoWindow, it presses the entire thing). Does anyone know how to customize this a bit more?
One Solution collect form web for “Adding buttons to map infowindow android”
Just found this in the documentation.
As mentioned in the previous section on info windows, an info window
is not a live View, rather the view is rendered as an image onto the
map. As a result, any listeners you set on the view are disregarded
and you cannot distinguish between click events on various parts of
the view. You are advised not to place interactive components — such
as buttons, checkboxes, or text inputs — within your custom info
Unfortunately, that answers it. I was trying to add the same function as you.