Fragment.OnCreateOptionsMenu(IMenu, MenuInflater) Method

Definition

Initialize the contents of the Activity's standard options menu.

[Android.Runtime.Register("onCreateOptionsMenu", "(Landroid/view/Menu;Landroid/view/MenuInflater;)V", "GetOnCreateOptionsMenu_Landroid_view_Menu_Landroid_view_MenuInflater_Handler")]
public virtual void OnCreateOptionsMenu(Android.Views.IMenu? menu, Android.Views.MenuInflater? inflater);
[<Android.Runtime.Register("onCreateOptionsMenu", "(Landroid/view/Menu;Landroid/view/MenuInflater;)V", "GetOnCreateOptionsMenu_Landroid_view_Menu_Landroid_view_MenuInflater_Handler")>]
abstract member OnCreateOptionsMenu : Android.Views.IMenu * Android.Views.MenuInflater -> unit
override this.OnCreateOptionsMenu : Android.Views.IMenu * Android.Views.MenuInflater -> unit

Parameters

menu
IMenu

Menu: The options menu in which you place your items.

inflater
MenuInflater

MenuInflater

Attributes

Remarks

Initialize the contents of the Activity's standard options menu. You should place your menu items in to menu. For this method to be called, you must have first called setHasOptionsMenu(boolean). See Activity.onCreateOptionsMenu for more information.

See also:

Android reference for android.app.Fragment.onCreateOptionsMenu.

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