material-popup-menu / com.github.zawadz88.materialpopupmenu / MaterialPopupMenuBuilder / ItemHolder

ItemHolder

class ItemHolder : MaterialPopupMenuBuilder.AbstractItemHolder

Holds section item info for the builder. This gets converted to MaterialPopupMenu.PopupMenuItem.

Constructors

<init>

ItemHolder()

Holds section item info for the builder. This gets converted to MaterialPopupMenu.PopupMenuItem.

Properties

hasNestedItems

var hasNestedItems: Boolean

Optional. If set to true this will show a "menu-end" icon, which indicates that there might be a submenu shown. false by default.

icon

var icon: Int

Optional icon to be displayed together with the label.

iconColor

var iconColor: Int

Optional icon tint color.

iconDrawable

var iconDrawable: Drawable?

Optional icon to be displayed together with the label.

label

var label: CharSequence?

Item label.

labelColor

var labelColor: Int

Optional text color of the label. If not set or 0 the default color will be used.

labelRes

var labelRes: Int

Item label.

Inherited Properties

callback

var callback: () -> Unit

Callback to be invoked once an item gets selected.

dismissOnSelect

var dismissOnSelect: Boolean

Whether to dismiss the popup once an item gets selected. Defaults to true.

viewBoundCallback

var viewBoundCallback: (View) -> Unit

Callback to be invoked once the item view gets created and bound. It is to be used when some views inside need to be updated once inflated.

Functions

toString

fun toString(): String

Inherited Functions

resolveViewBoundCallback

fun resolveViewBoundCallback(): ViewBoundCallback