GesturePointersUtility

public class GesturePointersUtility

Retains/Releases pointer Ids so that each pointer can only be used in one gesture at a time. Provides helper functions for converting touch coordinates between pixels and inches.

Public Constructors

Public Methods

float
inchesToPixels(float inches)
boolean
isPointerIdRetained(int pointerId)
static Vector3
motionEventToPosition(MotionEvent me, int pointerId)
float
pixelsToInches(float pixels)
void
releasePointerId(int pointerId)
void
retainPointerId(int pointerId)

Inherited Methods

Public Constructors

public GesturePointersUtility (DisplayMetrics displayMetrics)

Parameters
displayMetrics

Public Methods

public float inchesToPixels (float inches)

Parameters
inches

public boolean isPointerIdRetained (int pointerId)

Parameters
pointerId

public static Vector3 motionEventToPosition (MotionEvent me, int pointerId)

Parameters
me
pointerId

public float pixelsToInches (float pixels)

Parameters
pixels

public void releasePointerId (int pointerId)

Parameters
pointerId

public void retainPointerId (int pointerId)

Parameters
pointerId

Send feedback about...