IViewParent.ShowContextMenuForChild Method

Definition

Overloads

ShowContextMenuForChild(View)

Shows the context menu for the specified view or its ancestors.

ShowContextMenuForChild(View, Single, Single)

Shows the context menu for the specified view or its ancestors anchored to the specified view-relative coordinate.

ShowContextMenuForChild(View)

Shows the context menu for the specified view or its ancestors.

[Android.Runtime.Register("showContextMenuForChild", "(Landroid/view/View;)Z", "GetShowContextMenuForChild_Landroid_view_View_Handler:Android.Views.IViewParentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool ShowContextMenuForChild (Android.Views.View? originalView);
[<Android.Runtime.Register("showContextMenuForChild", "(Landroid/view/View;)Z", "GetShowContextMenuForChild_Landroid_view_View_Handler:Android.Views.IViewParentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member ShowContextMenuForChild : Android.Views.View -> bool

Parameters

originalView
View

the source view where the context menu was first invoked

Returns

true if the context menu was shown, false otherwise

Attributes

Remarks

Shows the context menu for the specified view or its ancestors.

In most cases, a subclass does not need to override this. However, if the subclass is added directly to the window manager (for example, ViewManager#addView(View, android.view.ViewGroup.LayoutParams)) then it should override this and show the context menu.

Java documentation for android.view.ViewParent.showContextMenuForChild(android.view.View).

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

ShowContextMenuForChild(View, Single, Single)

Shows the context menu for the specified view or its ancestors anchored to the specified view-relative coordinate.

[Android.Runtime.Register("showContextMenuForChild", "(Landroid/view/View;FF)Z", "GetShowContextMenuForChild_Landroid_view_View_FFHandler:Android.Views.IViewParentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)]
public bool ShowContextMenuForChild (Android.Views.View? originalView, float x, float y);
[<Android.Runtime.Register("showContextMenuForChild", "(Landroid/view/View;FF)Z", "GetShowContextMenuForChild_Landroid_view_View_FFHandler:Android.Views.IViewParentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)>]
abstract member ShowContextMenuForChild : Android.Views.View * single * single -> bool

Parameters

originalView
View

the source view where the context menu was first invoked

x
Single

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

y
Single

the Y coordinate in pixels relative to the original 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 the specified view or its ancestors anchored to the specified view-relative coordinate.

In most cases, a subclass does not need to override this. However, if the subclass is added directly to the window manager (for example, ViewManager#addView(View, android.view.ViewGroup.LayoutParams)) then it should override this and show the context menu.

If a subclass overrides this method it should also override #showContextMenuForChild(View).

Java documentation for android.view.ViewParent.showContextMenuForChild(android.view.View, 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