PopupToolbarMenuItem

data class PopupToolbarMenuItem @JvmOverloads constructor(val id: Int, val title: Int, val iconRes: Int = 0, val isEnabled: Boolean = true, val iconDrawable: Drawable? = null, val tintColor: Int = 0, val isShowIconAndText: Boolean = false)

A data class representation of a single popup toolbar menu item.

Constructors

Link copied to clipboard
constructor(id: Int, title: Int, iconRes: Int = 0, isEnabled: Boolean = true, iconDrawable: Drawable? = null, tintColor: Int = 0, isShowIconAndText: Boolean = false)

Properties

Link copied to clipboard

Optional icon drawable instance. When set, takes precedence over iconRes. This is useful for dynamic drawables like the color circle used in the annotation inspector.

Link copied to clipboard

Optional icon drawable resource. When set, the icon is displayed to the start of the title.

Link copied to clipboard
@get:IdRes
val id: Int

Id of the menu item.

Link copied to clipboard

Whether the menu item is enabled or not.

Link copied to clipboard

Whether to show both icon and text in collapsed mode. By default (false), items with an icon show only the icon in the collapsed toolbar and reveal the text in the overflow. When set to true, both icon and text are shown even in the collapsed toolbar.

Link copied to clipboard

Optional tint color for the text and icon. When 0, the default theme tint is used.

Link copied to clipboard

Menu item title string resource.