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

This method is deprecated.

use getEndHeaderActions instead.

@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 Header

Returns the Header to display in this template.

@Nullable Action

This method is deprecated.

use getStartHeaderAction instead.

@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

This method is deprecated.

use getTitle instead.

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

Returns whether the template is loading.

@NonNull String

Public methods

equals

public boolean equals(@Nullable Object other)

getActionStrip

Added in 1.1.0
Deprecated in 1.7.0-beta02
@RequiresCarApi(value = 2)
public @Nullable ActionStrip getActionStrip()

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

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.

getHeader

Added in 1.7.0-beta02
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

getHeaderAction

Added in 1.0.0
Deprecated in 1.7.0-beta02
public @Nullable Action getHeaderAction()

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

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
Deprecated in 1.7.0-beta02
public @Nullable CarText getTitle()

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

hashCode

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

public @NonNull String toString()