BrowserActionItem

public class BrowserActionItem
extends Object

java.lang.Object
   ↳ androidx.browser.browseractions.BrowserActionItem


A wrapper class holding custom item of Browser Actions menu. The Bitmap is optional for a BrowserActionItem.

Summary

Public constructors

BrowserActionItem(String title, PendingIntent action, int iconId)

Constructor for BrowserActionItem with icon, string and action provided.

BrowserActionItem(String title, PendingIntent action)

Constructor for BrowserActionItem with only string and action provided.

Public methods

PendingIntent getAction()
int getIconId()
String getTitle()

Inherited methods

Public constructors

BrowserActionItem

public BrowserActionItem (String title, 
                PendingIntent action, 
                int iconId)

Constructor for BrowserActionItem with icon, string and action provided.

Parameters
title String: The string shown for a custom item.

action PendingIntent: The PendingIntent executed when a custom item is selected

iconId int: The resource id of the icon shown for a custom item.

BrowserActionItem

public BrowserActionItem (String title, 
                PendingIntent action)

Constructor for BrowserActionItem with only string and action provided.

Parameters
title String: The icon shown for a custom item.

action PendingIntent: The string shown for a custom item.

Public methods

getAction

public PendingIntent getAction ()

Returns
PendingIntent The action of a custom item.

getIconId

public int getIconId ()

Returns
int The resource id of the icon.

getTitle

public String getTitle ()

Returns
String The title of a custom item.