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

BrowserMenuBuilder

class BrowserMenuBuilder (source)

Helper class for building browser menus.

Parameters

items - List of BrowserMenuItem objects to compose the menu from.

extras - Map of extra values that are added to emitted facts

endOfMenuAlwaysVisible - when is set to true makes sure the bottom of the menu is always visible otherwise, the top of the menu is always visible.

Constructors

Name Summary
<init> BrowserMenuBuilder(items: List<BrowserMenuItem>, extras: Map<String, Any> = emptyMap(), endOfMenuAlwaysVisible: Boolean = false)
Helper class for building browser menus.

Properties

Name Summary
endOfMenuAlwaysVisible val endOfMenuAlwaysVisible: Boolean
when is set to true makes sure the bottom of the menu is always visible otherwise, the top of the menu is always visible.
extras val extras: Map<String, Any>
Map of extra values that are added to emitted facts
items val items: List<BrowserMenuItem>
List of BrowserMenuItem objects to compose the menu from.

Functions

Name Summary
build fun build(context: <ERROR CLASS>): BrowserMenu

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.