RotateGestureDetector
Detects rotation transformation gestures using the supplied MotionEvents.
The OnRotateListener callback will notify users when a particular gesture event has occurred.
This class should only be used with MotionEvents reported via touch.
To use this class:
Create an instance of the RotateGestureDetector for your android.view.View.
In the android.view.View.onTouchEvent method ensure you call onTouchEvent. The methods defined in your callback will be executed when the events occur.
Parameters
the application's context
the listener invoked for all the callbacks, this must not be null
Types
The listener for receiving notifications when gestures occur.
A convenience class to extend when you only want to listen for a subset of rotation-related events.
Properties
The average angle in radians between each of the pointers forming the gesture in progress through the focal point.
The current distance in pixels between the two pointers forming the gesture in progress.
true
if a rotate gesture is in progress.
The previous average angle in radians between each of the pointers forming the gesture in progress through the focal point.
The previous distance in pixels between the two pointers forming the gesture in progress.
The initial rotation threshold in degrees for detecting a gesture.
Functions
Accepts MotionEvents and dispatches events to a OnRotateListener when appropriate.