Compartir a través de


IMenuItem.SetCheckable(Boolean) Method

Definition

Control whether this item can display a check mark.

[Android.Runtime.Register("setCheckable", "(Z)Landroid/view/MenuItem;", "GetSetCheckable_ZHandler:Android.Views.IMenuItemInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Views.IMenuItem SetCheckable (bool checkable);
[<Android.Runtime.Register("setCheckable", "(Z)Landroid/view/MenuItem;", "GetSetCheckable_ZHandler:Android.Views.IMenuItemInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetCheckable : bool -> Android.Views.IMenuItem

Parameters

checkable
Boolean

Set to true to allow a check mark, false to disallow. The default is false.

Returns

This Item so additional setters can be called.

Attributes

Remarks

Control whether this item can display a check mark. Setting this does not actually display a check mark (see #setChecked for that); rather, it ensures there is room in the item in which to display a check mark.

See Menu for the menu types that support check marks.

Java documentation for android.view.MenuItem.setCheckable(boolean).

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

See also