MapTemplate

Added in 1.2.0
Deprecated in 1.7.0-beta02

@RequiresCarApi(value = 5)
@CarProtocol
public final class MapTemplate implements Template


A template that displays a map with data such as Pane or ItemList on top of it.

Template Restrictions In regards to template refreshes, as described in onGetTemplate, this template is considered a refresh of a previous one if:
  • 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 Panes or ItemLists have not changed.
For instance, using the deprecated MapTemplate, if the template was:
MapTemplate.Builder builder = new MapTemplate.Builder()
         .setPane(paneBuilder.build())
         .setActionStrip(actionStrip)
         .setHeader(header)
         .setMapController(mapController)
         .build();
Using the new MapWithContentTemplate, the template would be:
MapWithContentTemplate template = new MapWithContentTemplate.Builder()
           .setContentTemplate(new PaneTemplate.Builder(paneBuilder.build())
                  .setHeader(header)
                  .build())
           .setActionStrip(actionStrip)
           .setMapController(mapController)
           .build();

Summary

Nested types

public final class MapTemplate.Builder

A builder of MapTemplate.

Public methods

boolean
@Nullable ActionStrip

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

@Nullable Header

Returns the Header to display in this template.

@Nullable ItemList

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

@Nullable MapController

Returns the controls associated with an app-provided map.

@Nullable Pane

Returns the Pane to display in this template.

int

Public methods

equals

public boolean equals(@Nullable Object other)

getActionStrip

Added in 1.2.0
Deprecated in 1.7.0-beta02
public @Nullable ActionStrip getActionStrip()

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

See also
setActionStrip

getHeader

Added in 1.2.0
Deprecated in 1.7.0-beta02
public @Nullable Header getHeader()

Returns the Header to display in this template.

See also
setHeader

getItemList

Added in 1.3.0
Deprecated in 1.7.0-beta02
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

getMapController

Added in 1.2.0
Deprecated in 1.7.0-beta02
public @Nullable MapController getMapController()

Returns the controls associated with an app-provided map.

See also
setMapController

getPane

Added in 1.2.0
Deprecated in 1.7.0-beta02
public @Nullable Pane getPane()

Returns the Pane to display in this template.

See also
setPane

hashCode

public int hashCode()