ActionStrip.Builder

public static final class ActionStrip.Builder
extends Object

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


A builder of ActionStrip.

Summary

Public constructors

Builder()

Creates an empty ActionStrip.Builder instance.

Public methods

ActionStrip.Builder addAction(Action action)

Adds an Action to the list.

ActionStrip build()

Constructs the ActionStrip defined by this builder.

Inherited methods

Public constructors

Builder

public Builder ()

Creates an empty ActionStrip.Builder instance.

Public methods

addAction

public ActionStrip.Builder addAction (Action action)

Adds an Action to the list.

Background colors are not supported on an action inside an ActionStrip.

Spans are not supported in the title of the action and will be ignored.

Parameters
action Action

Returns
ActionStrip.Builder

Throws
IllegalArgumentException if the background color of the action is specified, or if action is a standard action and an action of the same type has already been added, of if the action's title contains unsupported spans.
NullPointerException if action is null

build

public ActionStrip build ()

Constructs the ActionStrip defined by this builder.

Returns
ActionStrip

Throws
IllegalStateException if the action strip is empty