android-components / mozilla.components.browser.menu.item / BrowserMenuDivider

BrowserMenuDivider

class BrowserMenuDivider : BrowserMenuItem (source)

A browser menu item to display a horizontal divider.

Constructors

Name Summary
<init> BrowserMenuDivider()
A browser menu item to display a horizontal divider.

Properties

Name Summary
interactiveCount val interactiveCount: () -> Int
Lambda expression that returns the number of interactive elements in this menu item. For example, a simple item will have 1, divider will have 0, and a composite item, like a tool bar, will have several.
visible var 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

Name Summary
asCandidate fun asCandidate(context: <ERROR CLASS>): DividerMenuCandidate
Converts the menu item into a menu candidate.
bind fun bind(menu: BrowserMenu, view: <ERROR CLASS>): Unit
Called by the browser menu to display the data of this item using the passed view.
getLayoutResource fun getLayoutResource(): <ERROR CLASS>
Returns the layout resource ID of the layout to be inflated for showing a menu item of this type.

Inherited Functions

Name Summary
invalidate open fun invalidate(view: <ERROR CLASS>): Unit
Called by the browser menu to update the displayed data of this item using the passed view.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.