IMenu.Add IMenu.Add Method

Definition

Overloads

Add(ICharSequence) Add(ICharSequence)

Add a new item to the menu.

Add(Int32) Add(Int32)

Add a new item to the menu.

Add(Int32, Int32, Int32, ICharSequence) Add(Int32, Int32, Int32, ICharSequence)

Add a new item to the menu.

Add(Int32, Int32, Int32, Int32) Add(Int32, Int32, Int32, Int32)

Android.Views.Menu.add(int,int,int,java.lang.CharSequence)

Add(ICharSequence) Add(ICharSequence)

Add a new item to the menu.

[Android.Runtime.Register("add", "(Ljava/lang/CharSequence;)Landroid/view/MenuItem;", "GetAdd_Ljava_lang_CharSequence_Handler:Android.Views.IMenuInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Views.IMenuItem Add (Java.Lang.ICharSequence title);
abstract member Add : Java.Lang.ICharSequence -> Android.Views.IMenuItem

Parameters

title
ICharSequence ICharSequence

The text to display for the item.

Returns

Remarks

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.

Add(Int32) Add(Int32)

Add a new item to the menu.

[Android.Runtime.Register("add", "(I)Landroid/view/MenuItem;", "GetAdd_IHandler:Android.Views.IMenuInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Views.IMenuItem Add (int titleRes);
abstract member Add : int -> Android.Views.IMenuItem

Parameters

titleRes
Int32 Int32

Resource identifier of title string.

Returns

Remarks

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.

Add(Int32, Int32, Int32, ICharSequence) Add(Int32, Int32, Int32, ICharSequence)

Add a new item to the menu.

[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 Android.Views.IMenuItem Add (int groupId, int itemId, int order, Java.Lang.ICharSequence title);
abstract member Add : int * int * int * Java.Lang.ICharSequence -> Android.Views.IMenuItem

Parameters

groupId
Int32 Int32

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 None if an item should not be in a group.

itemId
Int32 Int32

Unique item ID. Use None if you do not need a unique ID.

order
Int32 Int32

The order for the item. Use None if you do not care about the order. See Order.

title
ICharSequence ICharSequence

The text to display for the item.

Returns

Remarks

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.

Add(Int32, Int32, Int32, Int32) Add(Int32, Int32, Int32, Int32)

Android.Views.Menu.add(int,int,int,java.lang.CharSequence)

[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 Android.Views.IMenuItem Add (int groupId, int itemId, int order, int titleRes);
abstract member Add : int * int * int * int -> Android.Views.IMenuItem

Parameters

groupId
Int32 Int32

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 None if an item should not be in a group.

itemId
Int32 Int32

Unique item ID. Use None if you do not need a unique ID.

order
Int32 Int32

The order for the item. Use None if you do not care about the order. See Order.

titleRes
Int32 Int32

Resource identifier of title string.

Returns

Remarks

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.

Applies to