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 in onGetTemplate, 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.Builder

A builder of MessageTemplate.

Public methods

boolean
@Nullable ActionStrip

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

@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 null if not set.

@Nullable Action

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

@Nullable CarIcon

Returns the icon to display in the template or null if not set.

@NonNull CarText

Returns the message to display in the template.

@Nullable CarText

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

int
boolean
@RequiresCarApi(value = 2)
isLoading()

Returns whether the template is loading.

@NonNull String

Public methods

equals

Added in 1.4.0-rc02
public boolean equals(@Nullable Object other)

getActionStrip

Added in 1.1.0
@RequiresCarApi(value = 2)
public @Nullable ActionStrip getActionStrip()

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

See also
setActionStrip

getActions

Added in 1.0.0
public @NonNull List<ActiongetActions()

Returns the list of actions to display in the template.

See also
addAction

getDebugMessage

Added in 1.0.0
public @Nullable CarText getDebugMessage()

Returns a debug message to display in the template or null if not set.

getHeaderAction

Added in 1.0.0
public @Nullable Action getHeaderAction()

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

See also
setHeaderAction

getIcon

Added in 1.0.0
public @Nullable CarIcon getIcon()

Returns the icon to display in the template or null if not set.

See also
setIcon

getMessage

Added in 1.0.0
public @NonNull CarText getMessage()

Returns the message to display in the template.

See also
Builder

getTitle

Added in 1.0.0
public @Nullable CarText getTitle()

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

See also
setTitle

hashCode

Added in 1.4.0-rc02
public int hashCode()

isLoading

Added in 1.1.0
@RequiresCarApi(value = 2)
public boolean isLoading()

Returns whether the template is loading.

See also
setLoading

toString

Added in 1.4.0-rc02
public @NonNull String toString()