CustomContentAction.Builder
public final class CustomContentAction.Builder
Builder class for CustomContentAction objects.
Summary
Public constructors |
|---|
Builder(Creates a new Builder for |
Public methods |
|
|---|---|
@NonNull CustomContentAction |
build()Builds the |
Public constructors
Builder
public Builder(
@IntRange(from = 0) int id,
@NonNull String label,
@NonNull PendingIntent pendingIntent,
int targetType
)
Creates a new Builder for CustomContentAction.
| Parameters | |
|---|---|
@IntRange(from = 0) int id |
A unique integer ID for this action. This ID will be sent back to your application when the action is triggered. It should be unique among all custom content actions added to a single |
@NonNull String label |
The user-visible label for this action (e.g., "Pin Image", "Share Link with App X"). The browser will display this text, but may truncate or otherwise alter it to fit its own UI limitations, which can vary between browsers. |
@NonNull PendingIntent pendingIntent |
The |
int targetType |
The type of content this action applies to (e.g., |
Public methods
build
public @NonNull CustomContentAction build()
Builds the CustomContentAction instance.
| Returns | |
|---|---|
@NonNull CustomContentAction |
The built |