Läs på engelska

Dela via


View.PerformLongClick Method

Definition

Overloads

PerformLongClick(Single, Single)

Calls this view's OnLongClickListener, if it is defined.

PerformLongClick()

Calls this view's OnLongClickListener, if it is defined.

PerformLongClick(Single, Single)

Calls this view's OnLongClickListener, if it is defined.

C#
[Android.Runtime.Register("performLongClick", "(FF)Z", "GetPerformLongClick_FFHandler", ApiSince=24)]
public virtual bool PerformLongClick(float x, float y);

Parameters

x
Single

x coordinate of the anchoring touch event, or Float#NaN to disable anchoring

y
Single

y coordinate of the anchoring touch event, or Float#NaN to disable anchoring

Returns

true if one of the above receivers consumed the event, false otherwise

Attributes

Remarks

Calls this view's OnLongClickListener, if it is defined. Invokes the context menu if the OnLongClickListener did not consume the event, anchoring it to an (x,y) coordinate.

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

.NET for Android .NET for Android API 35 och .NET for Android .NET for Android API 34
Produkt Versioner
.NET for Android .NET for Android API 34, .NET for Android API 35

PerformLongClick()

Calls this view's OnLongClickListener, if it is defined.

C#
[Android.Runtime.Register("performLongClick", "()Z", "GetPerformLongClickHandler")]
public virtual bool PerformLongClick();

Returns

true if one of the above receivers consumed the event, false otherwise

Attributes

Remarks

Calls this view's OnLongClickListener, if it is defined. Invokes the context menu if the OnLongClickListener did not consume the event.

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

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

.NET for Android .NET for Android API 35 och .NET for Android .NET for Android API 34
Produkt Versioner
.NET for Android .NET for Android API 34, .NET for Android API 35