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:

Parameters

context

the application's context

listener

the listener invoked for all the callbacks, this must not be null

Constructors

Link copied to clipboard
constructor(context: Context, listener: RotateGestureDetector.OnRotateListener)

Types

Link copied to clipboard

The listener for receiving notifications when gestures occur.

Link copied to clipboard

A convenience class to extend when you only want to listen for a subset of rotation-related events.

Properties

Link copied to clipboard

The average angle in radians between each of the pointers forming the gesture in progress through the focal point.

Link copied to clipboard

The current distance in pixels between the two pointers forming the gesture in progress.

Link copied to clipboard

The X coordinate of the current gesture's focal point in pixels.

Link copied to clipboard

The Y coordinate of the current gesture's focal point in pixels.

Link copied to clipboard

true if a rotate gesture is in progress.

Link copied to clipboard
Link copied to clipboard

The previous average angle in radians between each of the pointers forming the gesture in progress through the focal point.

Link copied to clipboard

The previous distance in pixels between the two pointers forming the gesture in progress.

Link copied to clipboard

The rotation factor in degrees from the previous rotation event to the current event.

Link copied to clipboard

The initial rotation threshold in degrees for detecting a gesture.

Link copied to clipboard

The time difference in milliseconds between the previous accepted GestureDetector event and the current GestureDetector event

Functions

Link copied to clipboard

Accepts MotionEvents and dispatches events to a OnRotateListener when appropriate.

Link copied to clipboard
fun reset()