ActionStrip.Builder


public final class ActionStrip.Builder


A builder of ActionStrip.

Summary

Public constructors

Creates an empty Builder instance.

Public methods

@NonNull ActionStrip.Builder

Adds an Action to the list.

@NonNull ActionStrip

Constructs the ActionStrip defined by this builder.

Public constructors

Builder

Added in 1.0.0
public Builder()

Creates an empty Builder instance.

Public methods

addAction

Added in 1.0.0
public @NonNull ActionStrip.Builder addAction(@NonNull Action action)

Adds an Action to the list.

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

Only the primary action for navigation and map templates will have the background color applied. Setting the background color has no effect in other templates.

Throws
java.lang.IllegalArgumentException

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.

java.lang.NullPointerException

if action is null

build

Added in 1.0.0
public @NonNull ActionStrip build()

Constructs the ActionStrip defined by this builder.

Throws
java.lang.IllegalStateException

if the action strip is empty

Discover the latest app development tools, platform updates, training, and documentation for developers across every Android device.

Updated Dec 18, 2024

In this codelab, you’ll learn the fundamentals of Android Accessibility. You’ll work through exercises to learn how to use the Android platform to build apps that can be used more easily by a wider set of people with different accessibility needs.

Updated May 25, 2024

Plan to create quality apps and features from the start by understanding best practices and requirements.

Updated Jan 3, 2024