Google Maps Android API v2 – Interactive InfoWindow (like in original android google maps)

I am trying to a make custom InfoWindow after a click on a marker with the new Google Maps API v2. I want it to look like in the original maps application by Google. Like this:

Example Image

When I have ImageButton inside, its not working – the entire InfoWindow is slected and not just the ImageButton. I read that it is because there isn’t a View itself but it’s snapshot, so individual items cannot be distinguished from each other.

EDIT:
In the documentation (thanks to Disco S2):

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
window.

But if Google use it, there must be some way to make it. Does anyone have any idea?

7 Answers
7

Leave a Comment