Dialog.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")]
public virtual bool OnCreatePanelMenu(int featureId, Android.Views.IMenu menu);
[<Android.Runtime.Register("onCreatePanelMenu", "(ILandroid/view/Menu;)Z", "GetOnCreatePanelMenu_ILandroid_view_Menu_Handler")>]
abstract member OnCreatePanelMenu : int * Android.Views.IMenu -> bool
override this.OnCreatePanelMenu : int * Android.Views.IMenu -> bool

Parameters

featureId
Int32

int: The panel being created.

menu
IMenu

Menu: This value cannot be null.

Returns

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

Implements

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 menu (and any items created from it), making modifications to it as desired, until the next time onCreatePanelMenu() is called for this feature.

See also:

Android reference for android.app.Dialog.onCreatePanelMenu.

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