Udostępnij za pośrednictwem


View.CreateContextMenu(IContextMenu) Method

Definition

Show the context menu for this view.

[Android.Runtime.Register("createContextMenu", "(Landroid/view/ContextMenu;)V", "GetCreateContextMenu_Landroid_view_ContextMenu_Handler")]
public virtual void CreateContextMenu (Android.Views.IContextMenu? menu);
[<Android.Runtime.Register("createContextMenu", "(Landroid/view/ContextMenu;)V", "GetCreateContextMenu_Landroid_view_ContextMenu_Handler")>]
abstract member CreateContextMenu : Android.Views.IContextMenu -> unit
override this.CreateContextMenu : Android.Views.IContextMenu -> unit

Parameters

menu
IContextMenu

The context menu to populate

Attributes

Remarks

Show the context menu for this view. It is not safe to hold on to the menu after returning from this method.

You should normally not overload this method. Overload #onCreateContextMenu(ContextMenu) or define an OnCreateContextMenuListener to add items to the context menu.

Java documentation for android.view.View.createContextMenu(android.view.ContextMenu).

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