android-components / mozilla.components.browser.menu.item / BrowserMenuHighlightableItem / <init>

<init>

BrowserMenuHighlightableItem(label: String, @DrawableRes imageResource: Int, @DrawableRes @ColorRes iconTintColorResource: Int = NO_ID, @ColorRes textColorResource: Int = NO_ID, highlight: Highlight? = null, listener: () -> Unit = {})

Deprecated Use the new constructor

BrowserMenuHighlightableItem(label: String, @DrawableRes startImageResource: Int, @DrawableRes @ColorRes iconTintColorResource: Int = NO_ID, @ColorRes textColorResource: Int = NO_ID, highlight: Highlight, isHighlighted: () -> Boolean = { true }, listener: () -> Unit = {})

A menu item for displaying text with an image icon and a highlight state which sets the background of the menu item and a second image icon to the right of the text.

Parameters

label - The visible label of this menu item.

startImageResource - ID of a drawable resource to be shown as a leftmost icon.

iconTintColorResource - Optional ID of color resource to tint the icon.

textColorResource - Optional ID of color resource to tint the text.

highlight - Highlight object storing the background drawable and additional icon

isHighlighted - Whether or not to display the highlight

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