Info Window Adapter
Provides custom views for marker info windows.
When an info window opens, getInfoWindow is called first. If it returns null, getInfoContents is called. If that returns null too, the default window with the marker's title and snippet is shown.
The returned view is drawn once into an image when the window opens, so it is not live: call Marker.showInfoWindow again to show changes. Taps on the window are reported to the OnInfoWindowClickListener, not to views inside it.
Example:
mapView.setInfoWindowAdapter(object : InfoWindowAdapter {
override fun getInfoWindow(marker: Marker): View? = null
override fun getInfoContents(marker: Marker): View =
TextView(context).apply { text = "${marker.title} (custom)" }
})Content copied to clipboard
Functions
Link copied to clipboard
Returns the view drawn inside the default info window frame, or null for the default title and snippet.
Link copied to clipboard
Returns the view for the whole info window, drawn without the default frame, or null to call getInfoContents instead.