Window.ICallback.OnCreatePanelMenu(Int32, IMenu) Method

Definition

Initialize the contents of the menu for panel 'featureId'.

[Android.Runtime.Register("onCreatePanelMenu", "(ILandroid/view/Menu;)Z", "GetOnCreatePanelMenu_ILandroid_view_Menu_Handler:Android.Views.Window/ICallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool OnCreatePanelMenu (int featureId, Android.Views.IMenu menu);
[<Android.Runtime.Register("onCreatePanelMenu", "(ILandroid/view/Menu;)Z", "GetOnCreatePanelMenu_ILandroid_view_Menu_Handler:Android.Views.Window/ICallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnCreatePanelMenu : int * Android.Views.IMenu -> bool

Parameters

featureId
Int32

The panel being created.

menu
IMenu

The menu inside the panel.

Returns

boolean You must return true for the panel to be displayed; if you return false it will not be shown.

Attributes

Remarks

Initialize the contents of the menu for panel 'featureId'. This is called if onCreatePanelView() returns null, giving you a standard menu in which you can place your items. It is only called once for the panel, the first time it is shown.

You can safely hold on to <var>menu</var> (and any items created from it), making modifications to it as desired, until the next time onCreatePanelMenu() is called for this feature.

Java documentation for android.view.Window.Callback.onCreatePanelMenu(int, android.view.Menu).

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