Android Guides | Samples

Android.Views.IMenu.Add Method

Add a new item to the menu.

Syntax

[Android.Runtime.Register("add", "(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;", "GetAdd_IIILjava_lang_CharSequence_Handler:Android.Views.IMenuInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public IMenuItem Add (Int32 groupId, Int32 itemId, Int32 order, ICharSequence title)

Parameters

groupId
The group identifier that this item should be part of. This can be used to define groups of items for batch state changes. Normally use Menu.None if an item should not be in a group.
itemId
Unique item ID. Use Menu.None if you do not need a unique ID.
order
The order for the item. Use Menu.None if you do not care about the order. See IMenuItem.Order.
title
The text to display for the item.

Remarks

Add a new item to the menu. This item displays the given title for its label.

[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