Android Guides | Samples

Android.Views.IMenuItem

Interface for direct access to a previously created menu item.

See Also: IMenuItem

Syntax

[Android.Runtime.Register("android/view/MenuItem", "", "Android.Views.IMenuItemInvoker")]
public interface IMenuItem : IJavaObject, IDisposable

Remarks

Interface for direct access to a previously created menu item.

An Item is returned by calling one of the Menu.add(int) methods.

For a feature set of specific menu types, see Menu.

Developer Guides

For information about creating menus, read the Menus developer guide.

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Views.IMenuItem are listed below.

Public Properties

[read-only]
ActionProviderActionProvider. Gets the ActionProvider.
[read-only]
ActionViewView. Returns the currently set action view for this menu item.
[read-only]
AlphabeticShortcutChar. Return the char for this menu item's alphabetic shortcut.
[read-only]
GroupIdInt32. Return the group identifier that this menu item is part of.
[read-only]
HasSubMenuBoolean. Check whether this item has an associated sub-menu.
[read-only]
IconDrawable. Returns the icon for this item as a Drawable (getting it from resources if it hasn't been loaded before).
[read-only]
IntentIntent. Return the Intent associated with this item.
[read-only]
IsActionViewExpandedBoolean. Returns true if this menu item's action view has been expanded.
[read-only]
IsCheckableBoolean. Return whether the item can currently display a check mark.
[read-only]
IsCheckedBoolean. Return whether the item is currently displaying a check mark.
[read-only]
IsEnabledBoolean. Return the enabled state of the menu item.
[read-only]
IsVisibleBoolean. Return the visibility of the menu item.
[read-only]
ItemIdInt32. Return the identifier for this menu item.
[read-only]
MenuInfoIContextMenuContextMenuInfo. Gets the extra information linked to this menu item.
[read-only]
NumericShortcutChar. Return the char for this menu item's numeric (12-key) shortcut.
[read-only]
OrderInt32. Return the category and order within the category of this item.
[read-only]
SubMenuISubMenu. Get the sub-menu to be invoked when this item is selected, if it has one.
[read-only]
TitleCondensedFormattedICharSequence. Retrieve the current condensed title of the item.
[read-only]
TitleFormattedICharSequence. Retrieve the current title of the item.

Public Methods

CollapseActionView() : Boolean
Collapse the action view associated with this menu item.
ExpandActionView() : Boolean
Expand the action view associated with this menu item.
SetActionProvider(ActionProvider) : IMenuItem
Sets the ActionProvider responsible for creating an action view if the item is placed on the action bar.
SetActionView(View) : IMenuItem
Set an action view for this menu item.
SetActionView(Int32) : IMenuItem
Set an action view for this menu item.
SetAlphabeticShortcut(Char) : IMenuItem
Change the alphabetic shortcut associated with this item.
SetCheckable(Boolean) : IMenuItem
Control whether this item can display a check mark.
SetChecked(Boolean) : IMenuItem
Control whether this item is shown with a check mark.
SetEnabled(Boolean) : IMenuItem
Sets whether the menu item is enabled.
SetIcon(Drawable) : IMenuItem
Change the icon associated with this item.
SetIcon(Int32) : IMenuItem
Change the icon associated with this item.
SetIntent(Intent) : IMenuItem
Change the Intent associated with this item.
SetNumericShortcut(Char) : IMenuItem
Change the numeric shortcut associated with this item.
SetOnActionExpandListener(IMenuItemOnActionExpandListener) : IMenuItem
Set an IMenuItemOnActionExpandListener on this menu item to be notified when the associated action view is expanded or collapsed.
SetOnMenuItemClickListener(IMenuItemOnMenuItemClickListener) : IMenuItem
Set a custom listener for invocation of this menu item.
SetShortcut(Char, Char) : IMenuItem
Change both the numeric and alphabetic shortcut associated with this item.
SetShowAsAction(ShowAsAction)
Sets how this item should display in the presence of an Action Bar.
SetShowAsActionFlags(ShowAsAction) : IMenuItem
Sets how this item should display in the presence of an Action Bar.
SetTitle(ICharSequence) : IMenuItem
Change the title associated with this item.
SetTitle(Int32) : IMenuItem
Change the title associated with this item.
SetTitleCondensed(ICharSequence) : IMenuItem
Change the condensed title associated with this item.
SetVisible(Boolean) : IMenuItem
Sets the visibility of the menu item.