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

BrowserMenuHighlight

sealed class BrowserMenuHighlight (source)

Describes how to display a mozilla.components.browser.menu.item.BrowserMenuHighlightableItem when it is highlighted.

Types

Name Summary
ClassicHighlight open class ~~ClassicHighlight~~ : BrowserMenuHighlight
Described how to display a highlightable menu item when it is highlighted. Replaced by LowPriority and HighPriority which lets a priority be specified. This class only exists so that mozilla.components.browser.menu.item.BrowserMenuHighlightableItem.Highlight can subclass it.
HighPriority data class HighPriority : BrowserMenuHighlight
Changes the background of the menu item. Used for errors that require user attention, like sync errors.
LowPriority data class LowPriority : BrowserMenuHighlight
Displays a notification dot. Used for highlighting new features to the user, such as what’s new or a recommended feature.

Properties

Name Summary
canPropagate abstract val canPropagate: Boolean
label abstract val label: String?

Functions

Name Summary
asEffect abstract fun asEffect(context: <ERROR CLASS>): MenuEffect
Converts the highlight into a corresponding MenuEffect from concept-menu.

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.

Inheritors

Name Summary
ClassicHighlight open class ~~ClassicHighlight~~ : BrowserMenuHighlight
Described how to display a highlightable menu item when it is highlighted. Replaced by LowPriority and HighPriority which lets a priority be specified. This class only exists so that mozilla.components.browser.menu.item.BrowserMenuHighlightableItem.Highlight can subclass it.
HighPriority data class HighPriority : BrowserMenuHighlight
Changes the background of the menu item. Used for errors that require user attention, like sync errors.
LowPriority data class LowPriority : BrowserMenuHighlight
Displays a notification dot. Used for highlighting new features to the user, such as what’s new or a recommended feature.