Android.App.Activity.OnCreateContextMenu Method
Called when a context menu for the view is about to be shown.

Syntax

[Android.Runtime.Register("onCreateContextMenu", "(Landroid/view/ContextMenu;Landroid/view/View;Landroid/view/ContextMenu$ContextMenuInfo;)V", "GetOnCreateContextMenu_Landroid_view_ContextMenu_Landroid_view_View_Landroid_view_ContextMenu_ContextMenuInfo_Handler")]
public virtual void OnCreateContextMenu (Android.Views.IContextMenu menu, Android.Views.View v, Android.Views.IContextMenuContextMenuInfo menuInfo)

Parameters

menu
The context menu that is being built
v
The view for which the context menu is being built
menuInfo
Extra information about the item for which the context menu should be shown. This information will vary depending on the class of v.

Remarks

Called when a context menu for the view is about to be shown. Unlike Activity.OnCreateOptionsMenu(Android.Views.IMenu), this will be called every time the context menu is about to be shown and should be populated for the view (or item inside the view for Android.Widget.AdapterView subclasses, this can be found in the menuInfo)).

Use Activity.OnContextItemSelected(Android.Views.IMenuItem) to know when an item has been selected.

It is not safe to hold onto the context menu after this method returns.

[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