Partager via


Fragment.SetMenuVisibility(Boolean) Method

Definition

Set a hint for whether this fragment's menu should be visible.

[Android.Runtime.Register("setMenuVisibility", "(Z)V", "GetSetMenuVisibility_ZHandler")]
public virtual void SetMenuVisibility (bool menuVisible);
[<Android.Runtime.Register("setMenuVisibility", "(Z)V", "GetSetMenuVisibility_ZHandler")>]
abstract member SetMenuVisibility : bool -> unit
override this.SetMenuVisibility : bool -> unit

Parameters

menuVisible
Boolean

The default is true, meaning the fragment's menu will be shown as usual. If false, the user will not see the menu.

Attributes

Remarks

Set a hint for whether this fragment's menu should be visible. This is useful if you know that a fragment has been placed in your view hierarchy so that the user can not currently seen it, so any menu items it has should also not be shown.

Java documentation for android.app.Fragment.setMenuVisibility(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