SupportMenuItem

(SESL variant) Interface for direct access to a previously created menu item. This version extends the one available in the framework to ensures that any necessary elements added in later versions of the framework, are available for all platforms.

See also

Properties

Link copied to clipboard
Always show this item as a button in an Action Bar.
Link copied to clipboard
This item's action view collapses to a normal menu item.
Link copied to clipboard
Show this item as a button in an Action Bar if the system decides there is room for it.
Link copied to clipboard
Never show this item as a button in an Action Bar.
Link copied to clipboard
When this item is in the action bar, always show it with a text label even if it also has an icon specified.

Functions

Link copied to clipboard
abstract fun collapseActionView(): Boolean
Collapse the action view associated with this menu item.
Link copied to clipboard
abstract fun expandActionView(): Boolean
Expand the action view associated with this menu item.
Link copied to clipboard
abstract fun getActionView(): View
Returns the currently set action view for this menu item.
Link copied to clipboard
abstract fun getAlphabeticModifiers(): Int
Return the modifier for this menu item's alphabetic shortcut.
Link copied to clipboard
Retrieve the content description associated with this menu item.
Link copied to clipboard
Link copied to clipboard
Returns the blending mode used to apply the tint to this item's icon, if specified.
Link copied to clipboard
abstract fun getNumericModifiers(): Int
Return the modifiers for this menu item's numeric (12-key) shortcut.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Retrieve the tooltip text associated with this menu item.
Link copied to clipboard
Returns true if this menu item's action view has been expanded.
Link copied to clipboard
Returns true if setShowAsAction was set to SHOW_AS_ACTION_ALWAYS.
Link copied to clipboard
abstract fun requiresOverflow(): Boolean
Returns true if setShowAsAction was set to SHOW_AS_ACTION_NEVER.
Link copied to clipboard
abstract fun setActionView(@Nullable view: View): MenuItem
abstract fun setActionView(resId: Int): MenuItem
Set an action view for this menu item.
Link copied to clipboard
abstract fun setAlphabeticShortcut(alphaChar: Char, alphaModifiers: Int): MenuItem
Change the alphabetic shortcut associated with this item.
Link copied to clipboard
Change the content description associated with this menu item.
Link copied to clipboard
Applies a tint to this item's icon.
Link copied to clipboard
Specifies the blending mode used to apply the tint specified by setIconTintList to this item's icon.
Link copied to clipboard
abstract fun setNumericShortcut(numericChar: Char, numericModifiers: Int): MenuItem
Change the numeric shortcut and modifiers associated with this item.
Link copied to clipboard
Link copied to clipboard
abstract fun setShortcut(numericChar: Char, alphaChar: Char, numericModifiers: Int, alphaModifiers: Int): MenuItem
Change both the numeric and alphabetic shortcut associated with this item.
Link copied to clipboard
abstract fun setShowAsAction(actionEnum: Int)
Sets how this item should display in the presence of an Action Bar.
Link copied to clipboard
abstract fun setShowAsActionFlags(actionEnum: Int): MenuItem
Sets how this item should display in the presence of an Action Bar.
Link copied to clipboard
Sets the ActionProvider responsible for creating an action view if the item is placed on the action bar.
Link copied to clipboard
Change the tooltip text associated with this menu item.