共用方式為


DragEvent.GetX Method

Definition

Gets the X coordinate of the drag point.

[Android.Runtime.Register("getX", "()F", "GetGetXHandler")]
public virtual float GetX ();
[<Android.Runtime.Register("getX", "()F", "GetGetXHandler")>]
abstract member GetX : unit -> single
override this.GetX : unit -> single

Returns

The current drag point's X coordinate

Attributes

Remarks

Gets the X coordinate of the drag point. The value is only valid if the event action is #ACTION_DRAG_STARTED, #ACTION_DRAG_LOCATION or #ACTION_DROP.

Java documentation for android.view.DragEvent.getX().

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