Android Guides | Samples

Android.Views.IMenu.Add Method

Variation on Menu.add(int, int, int, java.lang.CharSequence) that takes a string resource identifier instead of the string itself.

Syntax

[Android.Runtime.Register("add", "(IIII)Landroid/view/MenuItem;", "GetAdd_IIIIHandler:Android.Views.IMenuInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public IMenuItem Add (Int32 groupId, Int32 itemId, Int32 order, Int32 titleRes)

Parameters

groupId
The group identifier that this item should be part of. This can also 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.
titleRes
Resource identifier of title string.

Remarks

Variation on Menu.add(int, int, int, java.lang.CharSequence) that takes a string resource identifier instead of the string itself.

[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