Action.Builder


public final class Action.Builder


A builder for Action

Summary

Public constructors

Builder(@NonNull CharSequence title, @NonNull PendingIntent pendingIntent)

Public methods

final @NonNull Action

Builds an instance of Action

final @NonNull Action.Builder

Sets a sub title to be shown on the UI with this entry

Public constructors

Builder

Added in 1.2.0
public Builder(@NonNull CharSequence title, @NonNull PendingIntent pendingIntent)
Parameters
@NonNull CharSequence title

the title of this action entry

@NonNull PendingIntent pendingIntent

the PendingIntent that will get invoked when the user selects this entry, must be created with a unique request code per entry, with flag PendingIntent.FLAG_MUTABLE to allow the Android system to attach the final request, and NOT with flag PendingIntent.FLAG_ONE_SHOT as it can be invoked multiple times

Public methods

build

Added in 1.2.0
public final @NonNull Action build()

Builds an instance of Action

setSubtitle

Added in 1.2.0
public final @NonNull Action.Builder setSubtitle(CharSequence subtitle)

Sets a sub title to be shown on the UI with this entry