Share via


Activity.OnMenuItemSelected(Int32, IMenuItem) Method

Definition

Default implementation of android.view.Window.Callback#onMenuItemSelected for activities.

[Android.Runtime.Register("onMenuItemSelected", "(ILandroid/view/MenuItem;)Z", "GetOnMenuItemSelected_ILandroid_view_MenuItem_Handler")]
public virtual bool OnMenuItemSelected (int featureId, Android.Views.IMenuItem item);
[<Android.Runtime.Register("onMenuItemSelected", "(ILandroid/view/MenuItem;)Z", "GetOnMenuItemSelected_ILandroid_view_MenuItem_Handler")>]
abstract member OnMenuItemSelected : int * Android.Views.IMenuItem -> bool
override this.OnMenuItemSelected : int * Android.Views.IMenuItem -> bool

Parameters

featureId
Int32

The panel that the menu is in.

item
IMenuItem

The menu item that was selected.

Returns

Implements

Attributes

Remarks

Default implementation of android.view.Window.Callback#onMenuItemSelected for activities. This calls through to the new #onOptionsItemSelected method for the android.view.Window#FEATURE_OPTIONS_PANEL panel, so that subclasses of Activity don't need to deal with feature codes.

Java documentation for android.app.Activity.onMenuItemSelected(int, android.view.MenuItem).

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