MessageTemplate
@CarProtocol
public final class MessageTemplate implements Template
A template for displaying a message and associated actions.
Template Restrictions In regards to template refreshes, as described inonGetTemplate, this template is considered a refresh of a previous one if the title and messages have not changed.
Summary
Nested types |
|---|
public final class MessageTemplate.BuilderA builder of |
Public methods |
|
|---|---|
boolean |
|
@Nullable ActionStrip |
@RequiresCarApi(value = 2)This method is deprecated. use |
@NonNull List<Action> |
Returns the list of actions to display in the template. |
@Nullable CarText |
Returns a debug message to display in the template or |
@Nullable Header |
Returns the |
@Nullable Action |
This method is deprecated. use |
@Nullable CarIcon |
getIcon()Returns the icon to display in the template or |
@NonNull CarText |
Returns the message to display in the template. |
@Nullable CarText |
This method is deprecated. use |
int |
hashCode() |
boolean |
@RequiresCarApi(value = 2)Returns whether the template is loading. |
@NonNull String |
toString() |
Public methods
@RequiresCarApi(value = 2)
public @Nullable ActionStripgetActionStrip()
Returns the ActionStrip for this template or null if not set.
getActions
public @NonNull List<Action> getActions()
Returns the list of actions to display in the template.
| See also | |
|---|---|
addAction |
getDebugMessage
public @Nullable CarText getDebugMessage()
Returns a debug message to display in the template or null if not set.
| See also | |
|---|---|
setDebugMessage |
|
setDebugMessage |
getHeader
public @Nullable Header getHeader()
Returns the Header to display in this template.
This method was introduced in API 7, but is backwards compatible even if the client is using API 6 or below.
| See also | |
|---|---|
setHeader |
public @Nullable ActiongetHeaderAction()
Returns the Action that is set to be displayed in the header of the template, or null if not set.
getIcon
public @Nullable CarIcon getIcon()
Returns the icon to display in the template or null if not set.
| See also | |
|---|---|
setIcon |
getMessage
public @NonNull CarText getMessage()
Returns the message to display in the template.
| See also | |
|---|---|
Builder |
isLoading
@RequiresCarApi(value = 2)
public boolean isLoading()
Returns whether the template is loading.
| See also | |
|---|---|
setLoading |