android-components / / BrowserMenuCheckbox


class BrowserMenuCheckbox : BrowserMenuCompoundButton (source)

A simple browser menu checkbox.


label - The visible label of this menu item.

initialState - The initial value the checkbox should have.

listener - Callback to be invoked when this menu item is checked.


Name Summary
<init> BrowserMenuCheckbox(label: String, initialState: () -> Boolean = { false }, listener: (Boolean) -> Unit)
A simple browser menu checkbox.

Inherited Properties

Name Summary
label val label: String
The visible label of this menu item.
visible open 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.


Name Summary
asCandidate fun asCandidate(context: <ERROR CLASS>): CompoundMenuCandidate
Converts the menu item into a menu candidate.
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
bind open fun bind(menu: BrowserMenu, view: <ERROR CLASS>): Unit
Called by the browser menu to display the 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.