PlaceListMapTemplate


@CarProtocol
public final class PlaceListMapTemplate implements Template


A template that displays a map along with a list of places.

The map can display markers corresponding to the places in the list. See setItemList for details.

Template Restrictions In regards to template refreshes, as described in onGetTemplate, this template is considered a refresh of a previous one if:
  • The previous template is in a loading state (see setLoading, or
  • The template title has not changed, and the number of rows and the title (not counting spans) of each row between the previous and new ItemLists have not changed.
  • The template is sent in response to a user-initiated content refresh request. (see setOnContentRefreshListener.

Summary

Nested types

public final class PlaceListMapTemplate.Builder

A builder of PlaceListMapTemplate.

Public methods

boolean
@Nullable ActionStrip

Returns the ActionStrip for this template or null if not set.

@Nullable Place

Returns the Place instance to display as an anchor in the map.

@Nullable Action

Returns the Action that is set to be displayed in the header of the template, or null if not set.

@Nullable ItemList

Returns the ItemList instance with the list of items to display in the template, or null if not set.

@Nullable OnContentRefreshDelegate

Returns the OnContentRefreshDelegate to be called when the user requests for content refresh for this template.

@Nullable CarText

Returns the title of the template or null if not set.

int
boolean
boolean

Returns whether the template is loading.

@NonNull String

Public methods

equals

public boolean equals(@Nullable Object other)

getActionStrip

Added in 1.0.0
public @Nullable ActionStrip getActionStrip()

Returns the ActionStrip for this template or null if not set.

See also
setActionStrip

getAnchor

Added in 1.0.0
public @Nullable Place getAnchor()

Returns the Place instance to display as an anchor in the map.

See also
setAnchor

getHeaderAction

Added in 1.0.0
public @Nullable Action getHeaderAction()

Returns the Action that is set to be displayed in the header of the template, or null if not set.

See also
setHeaderAction

getItemList

Added in 1.0.0
public @Nullable ItemList getItemList()

Returns the ItemList instance with the list of items to display in the template, or null if not set.

See also
setItemList

getOnContentRefreshDelegate

Added in 1.2.0
@RequiresCarApi(value = 5)
public @Nullable OnContentRefreshDelegate getOnContentRefreshDelegate()

Returns the OnContentRefreshDelegate to be called when the user requests for content refresh for this template.

getTitle

Added in 1.0.0
public @Nullable CarText getTitle()

Returns the title of the template or null if not set.

See also
setTitle

hashCode

public int hashCode()

isCurrentLocationEnabled

Added in 1.0.0
public boolean isCurrentLocationEnabled()

isLoading

Added in 1.0.0
public boolean isLoading()

Returns whether the template is loading.

See also
setLoading

toString

public @NonNull String toString()