com.google.android.gms.maps.GoogleMap.InfoWindowAdapter |
Provides views for customized rendering of info windows.
Methods on this provider are called when it is time to show an info window for a marker,
regardless of the cause (either a user gesture or a programmatic call to
showInfoWindow()
. Since there is only one info window shown at any one time,
this provider may choose to reuse views, or it may choose to create new views on each method
invocation.
When constructing an info window, methods in this class are called in a defined order. To
replace the default info window, override getInfoWindow(Marker)
with your custom rendering
and return null
for getInfoContents(Marker)
. To replace only the info window
contents inside the default info window frame (the callout bubble), return null
in
getInfoWindow(Marker)
and override getInfoContents(Marker)
instead.
For more information, read the Info Windows developer guide.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Provides custom contents for the default info window frame of a marker.
| |||||||||||
Provides a custom info window for a marker.
|
Provides custom contents for the default info window frame of a marker. This method is
only called if getInfoWindow(Marker)
first returns null
. If this method returns
a view, it will be placed inside the default info window frame. If you change this view
after this method is called, those changes will not necessarily be reflected in the
rendered info window. If this method returns null
, the default rendering will be
used instead.
marker | The marker for which an info window is being populated. |
---|
marker
, or
null to use the default content rendering instead.
Provides a custom info window for a marker. If this method returns a view, it is used for
the entire info window. If you change this view after this method is called, those
changes will not necessarily be reflected in the rendered info window. If this method
returns null
, the default info window frame will be used, with contents provided
by getInfoContents(Marker)
.
marker | The marker for which an info window is being populated. |
---|
marker
, or null
to use the default
info window frame with custom contents
.