I am working on an android Google Maps app, and am having trouble with map markers.
This question might have a trivial solution but after searching, I have only found links on how to add a marker with a button. What I want is different: I want a marker whose respective dialog box has a button.
Has anyone done anything similar to this?
While you can create an
InfoWindowAdapter, and attach it to yourGoogleMapviasetInfoWindowAdapter(), to tailor the contents of an info window to contain aButton, theButtonwill not be clickable. TheViewyou return fromgetInfoContents()inInfoWindowAdapteris not displayed. Rather, it is converted into aBitmap, and that image is what is displayed.However, you can find out when the user taps on the info window via an
OnInfoWindowClickListenerregistered viasetOnInfoWindowClickListener()on yourGoogleMap.