Android 12 Developer Preview is here! Try it out, and give us your feedback!

PaneTemplate

public final class PaneTemplate
extends Object implements Template

java.lang.Object
   ↳ androidx.car.app.model.PaneTemplate


A template that displays a Pane.

Template Restrictions

In regards to template refreshes, as described in Screen.onGetTemplate(), this template is considered a refresh of a previous one if:
  • The template title has not changed, and
  • The previous template is in a loading state (see Pane.Builder.setLoading(boolean), or the number of rows and the string contents (title, texts, not counting spans) of each row between the previous and new Panes have not changed.

Summary

Nested classes

class PaneTemplate.Builder

A builder of PaneTemplate

Public methods

boolean equals(Object other)
ActionStrip getActionStrip()

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

Action getHeaderAction()

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

Pane getPane()

Returns the Pane to display in the template.

CarText getTitle()

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

int hashCode()
String toString()

Inherited methods

Public methods

equals

public boolean equals (Object other)

Parameters
other Object

Returns
boolean

getActionStrip

public ActionStrip getActionStrip ()

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

Returns
ActionStrip

getHeaderAction

public Action getHeaderAction ()

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

Returns
Action

getPane

public Pane getPane ()

Returns the Pane to display in the template.

Returns
Pane

getTitle

public CarText getTitle ()

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

Returns
CarText

hashCode

public int hashCode ()

Returns
int

toString

public String toString ()

Returns
String