Dela via


IMenuItem.SetTitle Method

Definition

Overloads

SetTitle(ICharSequence)

Change the title associated with this item.

SetTitle(Int32)

Change the title associated with this item.

SetTitle(ICharSequence)

Change the title associated with this item.

[Android.Runtime.Register("setTitle", "(Ljava/lang/CharSequence;)Landroid/view/MenuItem;", "GetSetTitle_Ljava_lang_CharSequence_Handler:Android.Views.IMenuItemInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Views.IMenuItem SetTitle (Java.Lang.ICharSequence? title);
[<Android.Runtime.Register("setTitle", "(Ljava/lang/CharSequence;)Landroid/view/MenuItem;", "GetSetTitle_Ljava_lang_CharSequence_Handler:Android.Views.IMenuItemInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetTitle : Java.Lang.ICharSequence -> Android.Views.IMenuItem

Parameters

title
ICharSequence

The new text to be displayed.

Returns

This Item so additional setters can be called.

Attributes

Remarks

Change the title associated with this item.

Java documentation for android.view.MenuItem.setTitle(java.lang.CharSequence).

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

SetTitle(Int32)

Change the title associated with this item.

[Android.Runtime.Register("setTitle", "(I)Landroid/view/MenuItem;", "GetSetTitle_IHandler:Android.Views.IMenuItemInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Views.IMenuItem SetTitle (int title);
[<Android.Runtime.Register("setTitle", "(I)Landroid/view/MenuItem;", "GetSetTitle_IHandler:Android.Views.IMenuItemInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetTitle : int -> Android.Views.IMenuItem

Parameters

title
Int32

The resource id of the new text to be displayed.

Returns

This Item so additional setters can be called.

Attributes

Remarks

Change the title associated with this item.

Some menu types do not sufficient space to show the full title, and instead a condensed title is preferred. See Menu for more information.

Java documentation for android.view.MenuItem.setTitle(int).

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.

See also

Applies to