SupportMenuItem

(SESL modified) 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
@Nullable
abstract fun getActionView(): @Nullable 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
@Nullable
abstract fun getContentDescription(): @Nullable CharSequence
Retrieve the content description associated with this menu item.
Link copied to clipboard
@Nullable
abstract fun getIconTintList(): @Nullable ColorStateList
Link copied to clipboard
abstract fun getIconTintMode(): @Nullable PorterDuff.Mode
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
@Nullable
abstract fun getSupportActionProvider(): @Nullable ActionProvider
Gets the ActionProvider.
Link copied to clipboard
@Nullable
abstract fun getTooltipText(): @Nullable CharSequence
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
@NonNull
abstract fun setActionView(@Nullable view: @Nullable View): @NonNull MenuItem
@NonNull
abstract fun setActionView(resId: Int): @NonNull MenuItem
Set an action view for this menu item.
Link copied to clipboard
@NonNull
abstract fun setAlphabeticShortcut(alphaChar: Char, alphaModifiers: Int): @NonNull MenuItem
Change the alphabetic shortcut associated with this item.
Link copied to clipboard
@NonNull
abstract fun setContentDescription(@Nullable contentDescription: @Nullable CharSequence): @NonNull SupportMenuItem
Change the content description associated with this menu item.
Link copied to clipboard
@NonNull
abstract fun setIconTintList(@Nullable tint: @Nullable ColorStateList): @NonNull MenuItem
Applies a tint to this item's icon.
Link copied to clipboard
@NonNull
abstract fun setIconTintMode(tintMode: @Nullable PorterDuff.Mode): @NonNull MenuItem
Specifies the blending mode used to apply the tint specified by setIconTintList to this item's icon.
Link copied to clipboard
@NonNull
abstract fun setNumericShortcut(numericChar: Char, numericModifiers: Int): @NonNull MenuItem
Change the numeric shortcut and modifiers associated with this item.
Link copied to clipboard
@NonNull
open fun setSeslNaviMenuItemType(itemType: Int): @NonNull MenuItem
Link copied to clipboard
@NonNull
abstract fun setShortcut(numericChar: Char, alphaChar: Char, numericModifiers: Int, alphaModifiers: Int): @NonNull 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
@NonNull
abstract fun setShowAsActionFlags(actionEnum: Int): @NonNull MenuItem
Sets how this item should display in the presence of an Action Bar.
Link copied to clipboard
@NonNull
abstract fun setSupportActionProvider(@Nullable actionProvider: @Nullable ActionProvider): @NonNull SupportMenuItem
Sets the ActionProvider responsible for creating an action view if the item is placed on the action bar.
Link copied to clipboard
@NonNull
abstract fun setTooltipText(@Nullable tooltipText: @Nullable CharSequence): @NonNull SupportMenuItem
Change the tooltip text associated with this menu item.