public static interface

RotateGestureDetector.OnRotateGestureListener

sofia.view.RotateGestureDetector.OnRotateGestureListener
Known Indirect Subclasses

Class Overview

The listener for receiving notifications when gestures occur. If you want to listen for all the different gestures then implement this interface. If you only want to listen for a subset it might be easier to extend RotateGestureDetector.SimpleOnRotateGestureListener. An application will receive events in the following order:

Summary

Public Methods
abstract boolean onRotate(RotateGestureDetector detector)
Responds to rotation events for a gesture in progress.
abstract boolean onRotateBegin(RotateGestureDetector detector)
Responds to the beginning of a rotation gesture.
abstract void onRotateEnd(RotateGestureDetector detector)
Responds to the end of a rotation gesture.

Public Methods

public abstract boolean onRotate (RotateGestureDetector detector)

Responds to rotation events for a gesture in progress. Reported by pointer motion.

Parameters
detector The detector reporting the event - use this to retrieve extended info about event state.
Returns
  • Whether or not the detector should consider this event as handled. If an event was not handled, the detector will continue to accumulate movement until an event is handled. This can be useful if an application, for example, only wants to update rotation factors if the change is greater than 0.01.

public abstract boolean onRotateBegin (RotateGestureDetector detector)

Responds to the beginning of a rotation gesture. Reported by new pointers going down.

Parameters
detector The detector reporting the event - use this to retrieve extended info about event state.
Returns
  • Whether or not the detector should continue recognizing this gesture. For example, if a gesture is beginning with a focal point outside of a region where it makes sense, onRotateBegin() may return false to ignore the rest of the gesture.

public abstract void onRotateEnd (RotateGestureDetector detector)

Responds to the end of a rotation gesture. Reported by existing pointers going up. Once a rotation has ended, RotateGestureDetector#getFocusX() and RotateGestureDetector#getFocusY() will return the location of the pointer remaining on the screen.

Parameters
detector The detector reporting the event - use this to retrieve extended info about event state.