public final class

BrowserActionsIntent.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.browser.browseractions.BrowserActionsIntent.Builder

Overview

Builder class for opening a Browser Actions context menu.

Summary

Constructors
publicBuilder(Context context, Uri uri)

Constructs a BrowserActionsIntent.Builder object associated with default setting for a selected url.

Methods
public BrowserActionsIntentbuild()

Combines all the options that have been set and returns a new BrowserActionsIntent object.

public BrowserActionsIntent.BuildersetCustomItems(java.util.ArrayList<BrowserActionItem> items)

Sets the custom items list.

public BrowserActionsIntent.BuildersetCustomItems(BrowserActionItem items[])

Sets the custom items list.

public BrowserActionsIntent.BuildersetOnItemSelectedAction(PendingIntent onItemSelectedPendingIntent)

Set the PendingIntent to be launched when a a browser specified menu item is selected.

public BrowserActionsIntent.BuildersetUrlType(int type)

Sets the type of Browser Actions context menu.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(Context context, Uri uri)

Constructs a BrowserActionsIntent.Builder object associated with default setting for a selected url.

Parameters:

context: The context requesting the Browser Actions context menu.
uri: The selected url for Browser Actions menu.

Methods

public BrowserActionsIntent.Builder setUrlType(int type)

Sets the type of Browser Actions context menu.

Parameters:

type: The type of url.

public BrowserActionsIntent.Builder setCustomItems(java.util.ArrayList<BrowserActionItem> items)

Sets the custom items list. Only maximum MAX_CUSTOM_ITEMS custom items are allowed, otherwise throws an java.lang.IllegalStateException.

Parameters:

items: The list of BrowserActionItem for custom items.

public BrowserActionsIntent.Builder setCustomItems(BrowserActionItem items[])

Sets the custom items list. Only maximum MAX_CUSTOM_ITEMS custom items are allowed, otherwise throws an java.lang.IllegalStateException.

Parameters:

items: The varargs of BrowserActionItem for custom items.

public BrowserActionsIntent.Builder setOnItemSelectedAction(PendingIntent onItemSelectedPendingIntent)

Set the PendingIntent to be launched when a a browser specified menu item is selected.

Parameters:

onItemSelectedPendingIntent: The PendingIntent to be launched.

public BrowserActionsIntent build()

Combines all the options that have been set and returns a new BrowserActionsIntent object.