TwistGesture

  • TwistGesture detects and tracks two-finger twist motions on a touchscreen.

  • It provides getDeltaRotationDegrees() to measure the rotation change in degrees.

  • Developers can use OnGestureEventListener to receive callbacks for twist gesture events (start, finish, cancel).

  • TwistGesture inherits functionality from BaseGesture for gesture management.

  • The gesture can be targeted to a specific Node in the scene.

public class TwistGesture

Gesture for when the user performs a two-finger twist motion on the touch screen.

Nested Classes

interface
Interface definition for callbacks to be invoked by a TwistGesture

Inherited Fields

Public Constructors

TwistGesture ( GesturePointersUtility gesturePointersUtility, MotionEvent motionEvent, int pointerId2)

Public Methods

Protected Methods

boolean
canStart ( HitTestResult hitTestResult, MotionEvent motionEvent)
TwistGesture
void
void
void
onStart ( HitTestResult hitTestResult, MotionEvent motionEvent)
boolean
updateGesture ( HitTestResult hitTestResult, MotionEvent motionEvent)

Inherited Methods

Public Constructors

public TwistGesture ( GesturePointersUtility gesturePointersUtility, MotionEvent motionEvent, int pointerId2)

Parameters
gesturePointersUtility
motionEvent
pointerId2

Public Methods

public float getDeltaRotationDegrees ()

Protected Methods

protected boolean canStart ( HitTestResult hitTestResult, MotionEvent motionEvent)

Parameters
hitTestResult
motionEvent

protected TwistGesture getSelf ()

protected void onCancel ()

protected void onFinish ()

protected void onStart ( HitTestResult hitTestResult, MotionEvent motionEvent)

Parameters
hitTestResult
motionEvent

protected boolean updateGesture ( HitTestResult hitTestResult, MotionEvent motionEvent)

Parameters
hitTestResult
motionEvent
Design a Mobile Site
View Site in Mobile | Classic
Share by: