IMenuItem IMenuItem Interface

Definition

Interface for direct access to a previously created menu item.

[Android.Runtime.Register("android/view/MenuItem", "", "Android.Views.IMenuItemInvoker", ApiSince=1)]
public interface IMenuItem : Android.Runtime.IJavaObject, IDisposable
type IMenuItem = interface
    interface IJavaObject
    interface IDisposable
Attributes
Implements

Remarks

Android platform documentation

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Properties

ActionProvider ActionProvider

Gets the ActionProvider.

ActionView ActionView

Returns the currently set action view for this menu item.

AlphabeticShortcut AlphabeticShortcut

Return the char for this menu item's alphabetic shortcut.

GroupId GroupId

Return the group identifier that this menu item is part of.

Handle Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
HasSubMenu HasSubMenu

Check whether this item has an associated sub-menu.

Icon Icon

Returns the icon for this item as a Drawable (getting it from resources if it hasn't been loaded before).

Intent Intent

Return the Intent associated with this item.

IsActionViewExpanded IsActionViewExpanded

Returns true if this menu item's action view has been expanded.

IsCheckable IsCheckable

Return whether the item can currently display a check mark.

IsChecked IsChecked

Return whether the item is currently displaying a check mark.

IsEnabled IsEnabled

Return the enabled state of the menu item.

IsVisible IsVisible

Return the visibility of the menu item.

ItemId ItemId

Return the identifier for this menu item.

MenuInfo MenuInfo

Gets the extra information linked to this menu item.

NumericShortcut NumericShortcut

Return the char for this menu item's numeric (12-key) shortcut.

Order Order

Return the category and order within the category of this item.

SubMenu SubMenu

Get the sub-menu to be invoked when this item is selected, if it has one.

TitleCondensedFormatted TitleCondensedFormatted

Retrieve the current condensed title of the item.

TitleFormatted TitleFormatted

Retrieve the current title of the item.

Methods

CollapseActionView() CollapseActionView()

Collapse the action view associated with this menu item.

ExpandActionView() ExpandActionView()

Expand the action view associated with this menu item.

SetActionProvider(ActionProvider) SetActionProvider(ActionProvider)

Sets the ActionProvider responsible for creating an action view if the item is placed on the action bar.

SetActionView(Int32) SetActionView(Int32)

Set an action view for this menu item.

SetActionView(View) SetActionView(View)

Set an action view for this menu item.

SetAlphabeticShortcut(Char) SetAlphabeticShortcut(Char)

Change the alphabetic shortcut associated with this item.

SetCheckable(Boolean) SetCheckable(Boolean)

Control whether this item can display a check mark.

SetChecked(Boolean) SetChecked(Boolean)

Control whether this item is shown with a check mark.

SetEnabled(Boolean) SetEnabled(Boolean)

Sets whether the menu item is enabled.

SetIcon(Drawable) SetIcon(Drawable)

Change the icon associated with this item.

SetIcon(Int32) SetIcon(Int32)

Change the icon associated with this item.

SetIntent(Intent) SetIntent(Intent)

Change the Intent associated with this item.

SetNumericShortcut(Char) SetNumericShortcut(Char)

Change the numeric shortcut associated with this item.

SetOnActionExpandListener(IMenuItemOnActionExpandListener) SetOnActionExpandListener(IMenuItemOnActionExpandListener)

Set an IMenuItemOnActionExpandListener on this menu item to be notified when the associated action view is expanded or collapsed.

SetOnMenuItemClickListener(IMenuItemOnMenuItemClickListener) SetOnMenuItemClickListener(IMenuItemOnMenuItemClickListener)

Set a custom listener for invocation of this menu item.

SetShortcut(Char, Char) SetShortcut(Char, Char)

Change both the numeric and alphabetic shortcut associated with this item.

SetShowAsAction(ShowAsAction) SetShowAsAction(ShowAsAction)

Sets how this item should display in the presence of an Action Bar.

SetShowAsActionFlags(ShowAsAction) SetShowAsActionFlags(ShowAsAction)

Sets how this item should display in the presence of an Action Bar.

SetTitle(ICharSequence) SetTitle(ICharSequence)

Change the title associated with this item.

SetTitle(Int32) SetTitle(Int32)

Change the title associated with this item.

SetTitleCondensed(ICharSequence) SetTitleCondensed(ICharSequence)

Change the condensed title associated with this item.

SetVisible(Boolean) SetVisible(Boolean)

Sets the visibility of the menu item.

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

SetTitle(IMenuItem, String) SetTitle(IMenuItem, String)
SetTitleCondensed(IMenuItem, String) SetTitleCondensed(IMenuItem, String)
JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Applies to