android-components / / MenuButton


class MenuButton (source)

A three-dot button used for expanding menus.

If you are using a browser toolbar, do not use this class directly.


Name Summary
<init> MenuButton(context: <ERROR CLASS>, attrs: <ERROR CLASS>? = null, defStyleAttr: Int = 0)
A three-dot button used for expanding menus.


Name Summary
getOrientation var getOrientation: () -> Orientation
Callback to get the orientation for the menu. This is called every time the menu should be displayed.
menuBuilder var menuBuilder: BrowserMenuBuilder?
onDismiss var onDismiss: () -> Unit
Listener called when the menu is dismissed.
onShow var onShow: () -> Unit
Listener called when the menu is shown.


Name Summary
dismissMenu fun dismissMenu(): Unit
Dismiss the menu, if open.
invalidateBrowserMenu fun invalidateBrowserMenu(): Unit
Invalidates the BrowserMenu, if open.
onClick fun onClick(v: <ERROR CLASS>): Unit
Shows the menu, or dismisses it if already open.
setColorFilter fun setColorFilter(color: Int): Unit
Sets the tint of the 3-dot menu icon.
setHighlight fun setHighlight(highlight: BrowserMenuHighlight?): Unit
Show the indicator for a browser menu highlight.

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.