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

The options menu in which you place your items.

inflater
MenuInflater
Attributes

Remarks

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

Java documentation for android.app.Fragment.onCreateOptionsMenu(android.view.Menu, android.view.MenuInflater).

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