Android.App.Fragment.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 Fragment.OnCreateOptionsMenu(Android.Views.IMenu, Android.Views.MenuInflater), 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 Fragment.OnContextItemSelected(Android.Views.IMenuItem) to know when an item has been selected.

The default implementation calls up to Activity.OnCreateContextMenu(Android.Views.IContextMenu, Android.Views.View, Android.Views.View), though you can not call this implementation if you don't want that behavior.

It is not safe to hold onto the context menu after this method returns. Called when the context menu for this view is being built. It is not safe to hold onto the 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 11