Stay organized with collections Save and categorize content based on your preferences.

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

public boolean equals(@Nullable Object other)

getActionStrip

@RequiresCarApi(value = 2)
public @Nullable ActionStrip getActionStrip()

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

See also
setActionStrip

getActions

public @NonNull List<ActiongetActions()

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.

getHeaderAction

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

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

getTitle

public @Nullable CarText getTitle()

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

See also
setTitle

hashCode

public int hashCode()

isLoading

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

Returns whether the template is loading.

See also
setLoading

toString

public @NonNull String toString()