MessageTemplate
public
final
class
MessageTemplate
extends Object
implements
Template
| java.lang.Object | |
| ↳ | androidx.car.app.model.MessageTemplate |
A template for displaying a message and associated actions.
Template Restrictions
In regards to template refreshes, as described inScreen.onGetTemplate(), this template is
considered a refresh of a previous one if the title and messages have not changed.
Summary
Nested classes | |
|---|---|
class |
MessageTemplate.Builder
A builder of |
Public methods | |
|---|---|
boolean
|
equals(Object other)
|
List<Action>
|
getActions()
Returns the list of actions to display in the template. |
CarText
|
getDebugMessage()
Returns a debug message to display in the template or |
Action
|
getHeaderAction()
Returns the |
CarIcon
|
getIcon()
Returns the icon to display in the template or |
CarText
|
getMessage()
Returns the message to display in the template. |
CarText
|
getTitle()
Returns the title of the template or |
int
|
hashCode()
|
String
|
toString()
|
Inherited methods | |
|---|---|
Public methods
equals
public boolean equals (Object other)
| Parameters | |
|---|---|
other |
Object |
| Returns | |
|---|---|
boolean |
|
getActions
public List<Action> getActions ()
Returns the list of actions to display in the template.
| Returns | |
|---|---|
List<Action> |
|
getDebugMessage
public CarText getDebugMessage ()
Returns a debug message to display in the template or null if not set.
| Returns | |
|---|---|
CarText |
|
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 |
|
getIcon
public CarIcon getIcon ()
Returns the icon to display in the template or null if not set.
| Returns | |
|---|---|
CarIcon |
|
See also:
getMessage
public CarText getMessage ()
Returns the message to display in the template.
| Returns | |
|---|---|
CarText |
|
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 |
|
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-02-24 UTC.