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 your GoogleMap
via setInfoWindowAdapter()
, to tailor the contents of an info window to contain a Button
, the Button
will not be clickable. The View
you return from getInfoContents()
in InfoWindowAdapter
is not displayed. Rather, it is converted into a Bitmap
, and that image is what is displayed.
However, you can find out when the user taps on the info window via an OnInfoWindowClickListener
registered via setOnInfoWindowClickListener()
on your GoogleMap
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With