Compartir a través de


IMenuItem.SetVisible(Boolean) Method

Definition

Sets the visibility of the menu item.

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

Parameters

visible
Boolean

If true then the item will be visible; if false it is hidden.

Returns

This Item so additional setters can be called.

Attributes

Remarks

Sets the visibility of the menu item. Even if a menu item is not visible, it may still be invoked via its shortcut (to completely disable an item, set it to invisible and #setEnabled(boolean) disabled).

Java documentation for android.view.MenuItem.setVisible(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