MotionEvent.GetX MotionEvent.GetX Method

Definition

Overloads

GetX() GetX()

GetX(Int32) for the first pointer index (may be an arbitrary pointer identifier).

GetX(Int32) GetX(Int32)

Returns the X coordinate of this event for the given pointer index (use GetPointerId(Int32) to find the pointer identifier for this index).

GetX() GetX()

GetX(Int32) for the first pointer index (may be an arbitrary pointer identifier).

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

Returns

Remarks

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.

GetX(Int32) GetX(Int32)

Returns the X coordinate of this event for the given pointer index (use GetPointerId(Int32) to find the pointer identifier for this index).

[Android.Runtime.Register("getX", "(I)F", "", ApiSince=5)]
public float GetX (int pointerIndex);
member this.GetX : int -> single

Parameters

pointerIndex
Int32 Int32

Raw index of pointer to retrieve. Value may be from 0 (the first pointer that is down) to PointerCount-1.

Returns

Remarks

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