public final class Action
extends Object


Represents an action with an optional icon and text.

Actions may be displayed differently depending on the template or model they are added to. For example, the host may decide to display an action as a floating action button (FAB) when displayed over a map, as a button when displayed in a Pane, or as a simple icon with no title when displayed within a Row.

Standard actions

A set of standard, built-in Action instances is available with a few of the common basic actions car apps may need (for example a BACK action).

With the exception of APP_ICON and BACK, an app can provide a custom title and icon for the action. However, depending on the template the action belongs to, the title or icon may be disallowed. If such restrictions apply, the documentation of the APIs that consume the action will note them accordingly.


Nested classes

class Action.Builder

A builder of Action



Indicates that this action is the most important one, out of a set of other actions.


An action representing an app's icon.


An action to navigate back in the user interface.


An app-defined custom action type.


An action to toggle the pan mode in a map-based template.


public static final Action APP_ICON

A standard action to show the app's icon.

public static final Action BACK

A standard action to navigate back in the user interface.

public static final Action PAN

A standard action to toggle the pan mode in a map-based template.

Public methods

boolean equals(Object other)
CarColor getBackgroundColor()

Returns the CarColor used for the background color of the action.

int getFlags()

Returns flags affecting how this action should be treated

CarIcon getIcon()

Returns the CarIcon to display in the action or null if the action does not have an icon.

OnClickDelegate getOnClickDelegate()

Returns the