Udostępnij za pośrednictwem


View.ShowContextMenu Method

Definition

Overloads

ShowContextMenu()

Shows the context menu for this view.

ShowContextMenu(Single, Single)

Shows the context menu for this view anchored to the specified view-relative coordinate.

ShowContextMenu()

Shows the context menu for this view.

[Android.Runtime.Register("showContextMenu", "()Z", "GetShowContextMenuHandler")]
public virtual bool ShowContextMenu ();
[<Android.Runtime.Register("showContextMenu", "()Z", "GetShowContextMenuHandler")>]
abstract member ShowContextMenu : unit -> bool
override this.ShowContextMenu : unit -> bool

Returns

true if the context menu was shown, false otherwise

Attributes

Remarks

Shows the context menu for this view.

Java documentation for android.view.View.showContextMenu().

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

ShowContextMenu(Single, Single)

Shows the context menu for this view anchored to the specified view-relative coordinate.

[Android.Runtime.Register("showContextMenu", "(FF)Z", "GetShowContextMenu_FFHandler", ApiSince=24)]
public virtual bool ShowContextMenu (float x, float y);
[<Android.Runtime.Register("showContextMenu", "(FF)Z", "GetShowContextMenu_FFHandler", ApiSince=24)>]
abstract member ShowContextMenu : single * single -> bool
override this.ShowContextMenu : single * single -> bool

Parameters

x
Single

the X coordinate in pixels relative to the view to which the menu should be anchored, or Float#NaN to disable anchoring

y
Single

the Y coordinate in pixels relative to the view to which the menu should be anchored, or Float#NaN to disable anchoring

Returns

true if the context menu was shown, false otherwise

Attributes

Remarks

Shows the context menu for this view anchored to the specified view-relative coordinate.

Java documentation for android.view.View.showContextMenu(float, float).

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