Android.Views.IMenu
Interface for managing the items in a menu.

See Also: IMenu Members

Syntax

[Android.Runtime.Register("android/view/Menu", "", "Android.Views.IMenuInvoker")]
public interface IMenu : Android.Runtime.IJavaObject, IDisposable

Remarks

Interface for managing the items in a menu.

By default, every Activity supports an options menu of actions or options. You can add items to this menu and handle clicks on your additions. The easiest way of adding menu items is inflating an XML file into the Android.Views.Menu via Android.Views.MenuInflater. The easiest way of attaching code to clicks is via Android.App.Activity.OnOptionsItemSelected(IMenuItem) and Android.App.Activity.OnContextItemSelected(IMenuItem).

Different menu types support different features:

  1. Context menus: Do not support item shortcuts and item icons.
  2. Options menus: The icon menus do not support item check marks and only show the item's IMenuItem.SetTitleCondensed(Java.Lang.ICharSequence). The expanded menus (only available if six or more menu items are visible, reached via the 'More' item in the icon menu) do not show item icons, and item check marks are discouraged.
  3. Sub menus: Do not support item icons, or nested sub menus.

Developer Guides

For more 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