android-components / mozilla.components.browser.menu / BrowserMenuItem

BrowserMenuItem

interface BrowserMenuItem (source)

Interface to be implemented by menu items to be shown in the browser menu.

Properties

visible

abstract val visible: () -> Boolean

Lambda expression that returns true if this item should be shown in the menu. Returns false if this item should be hidden.

Functions

bind

abstract fun bind(menu: BrowserMenu, view: View): Unit

Called by the browser menu to display the data of this item using the passed view.

getLayoutResource

abstract fun getLayoutResource(): Int

Returns the layout resource ID of the layout to be inflated for showing a menu item of this type.

Inheritors

BrowserMenuItemToolbar

class BrowserMenuItemToolbar : BrowserMenuItem

A toolbar of buttons to show inside the browser menu.

SimpleBrowserMenuCheckbox

class SimpleBrowserMenuCheckbox : BrowserMenuItem

A simple browser menu checkbox.

SimpleBrowserMenuItem

class SimpleBrowserMenuItem : BrowserMenuItem

A simple browser menu item displaying text.