public final class

MapWithContentTemplate.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.car.app.navigation.model.MapWithContentTemplate.Builder

Overview

A builder of MapWithContentTemplate.

Summary

Constructors
publicBuilder()

Methods
public MapWithContentTemplatebuild()

Constructs the template defined by this builder.

public MapWithContentTemplate.BuildersetActionStrip(ActionStrip actionStrip)

Sets the ActionStrip for this template.

public MapWithContentTemplate.BuildersetContentTemplate(Template template)

Sets the content to be displayed on top of the map tiles.

public MapWithContentTemplate.BuildersetMapController(MapController mapController)

Sets the MapController for this template.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Methods

public MapWithContentTemplate.Builder setActionStrip(ActionStrip actionStrip)

Sets the ActionStrip for this template.

Unless set with this method, the template will not have an action strip.

The Action buttons in Map Based Template are automatically adjusted based on the screen size. On narrow width screen, icon Actions show by default. If no icon specify, showing title Actions instead. On wider width screen, title Actions show by default. If no title specify, showing icon Actions instead.

Requirements

This template allows up to 4 Actions in its ActionStrip. Of the 4 allowed Actions, it can either be a title Action as set via , or a icon Action as set via .

public MapWithContentTemplate.Builder setContentTemplate(Template template)

Sets the content to be displayed on top of the map tiles.

From Car API 7 onward, the following template types are supported as content:

  • ListTemplate
  • PaneTemplate
  • GridTemplate
  • MessageTemplate

public MapWithContentTemplate.Builder setMapController(MapController mapController)

Sets the MapController for this template.

public MapWithContentTemplate build()

Constructs the template defined by this builder.

Requirements