Fragment.SetHasOptionsMenu(Boolean) Fragment.SetHasOptionsMenu(Boolean) Method


Report that this fragment would like to participate in populating the options menu by receiving a call to OnCreateOptionsMenu(IMenu, MenuInflater) and related methods.

[Android.Runtime.Register("setHasOptionsMenu", "(Z)V", "GetSetHasOptionsMenu_ZHandler")]
public virtual void SetHasOptionsMenu (bool hasMenu);
abstract member SetHasOptionsMenu : bool -> unit
override this.SetHasOptionsMenu : bool -> unit


Boolean Boolean

If true, the fragment has menu items to contribute.


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