Action.Builder

public static final class Action.Builder
extends Object

java.lang.Object
   ↳ androidx.car.app.model.Action.Builder


A builder of Action.

Summary

Public constructors

Builder()

Creates an empty Action.Builder instance.

Builder(Action action)

Returns a Action.Builder instance configured with the same data as the given Action instance.

Public methods

Action build()

Constructs the Action defined by this builder.

Action.Builder setBackgroundColor(CarColor backgroundColor)

Sets the background color to be used for the action.

Action.Builder setFlags(int flags)

Sets flags affecting how this action should be treated.

Action.Builder setIcon(CarIcon icon)

Sets the icon to display in the action.

Action.Builder setOnClickListener(OnClickListener listener)

Sets the OnClickListener to call when the action is clicked.

Action.Builder setTitle(CharSequence title)

Sets the title to display in the action.

Action.Builder setTitle(CarText title)

Sets the title to display in the action, with support for multiple length variants.

Inherited methods