Android Guides | Samples

Android.App.Activity.OnPrepareOptionsMenu Method

Prepare the Screen's standard options menu to be displayed.

Syntax

[Android.Runtime.Register("onPrepareOptionsMenu", "(Landroid/view/Menu;)Z", "GetOnPrepareOptionsMenu_Landroid_view_Menu_Handler")]
public virtual Boolean OnPrepareOptionsMenu (IMenu menu)

See Also

Parameters

menu
The options menu as last shown or first initialized by onCreateOptionsMenu().

Remarks

Prepare the Screen's standard options menu to be displayed. This is called right before the menu is shown, every time it is shown. You can use this method to efficiently enable/disable items or otherwise dynamically modify the contents.

The default implementation updates the system menu items based on the activity's state. Deriving classes should always call through to the base class implementation.

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1