I am using Google Map API V2 and i have created a custom InfoWindow for a Marker on map.In this InfoWindow i have a button.
My
You cannot click the button, because of the reason explained by @TamiL.
However, you can click the InfoWindow, so, store the ID(s) of the Marker(s) whose InfoWindow(s) should be clickable, add a GoogleMap.OnInfoWindowClickListener to the map like this:
map.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener()
{
@Override
public void onInfoWindowClick(Marker marker)
{
// Called when ANY InfoWindow is clicked
}
});
Then, when the onInfoWindowClick is called, compare the clicked Marker's ID with the ones that you stored earlier, and if any of them match, execute whatever code should be executed in the Button's click listener.
You don't have to deal with saving the Marker ID:s if all your Markers' InfoWindows are going to be clickable!