public static class

RotateGestureDetector.SimpleOnRotateGestureListener

extends Object
implements RotateGestureDetector.OnRotateGestureListener
java.lang.Object
   ↳ sofia.view.RotateGestureDetector.SimpleOnRotateGestureListener

Class Overview

A convenience class to extend when you only want to listen for a subset of rotation-related events. This implements all methods in RotateGestureDetector.OnRotateGestureListener but does nothing. onRotate(RotateGestureDetector) returns false so that a subclass can retrieve the accumulated rotation factor in an overridden onRotateEnd. onRotateBegin(RotateGestureDetector) returns true.

Summary

Public Constructors
RotateGestureDetector.SimpleOnRotateGestureListener()
Public Methods
boolean onRotate(RotateGestureDetector detector)
Responds to rotation events for a gesture in progress.
boolean onRotateBegin(RotateGestureDetector detector)
Responds to the beginning of a rotation gesture.
void onRotateEnd(RotateGestureDetector detector)
Responds to the end of a rotation gesture.
[Expand]
Inherited Methods
From class java.lang.Object
From interface sofia.view.RotateGestureDetector.OnRotateGestureListener

Public Constructors

public RotateGestureDetector.SimpleOnRotateGestureListener ()

Public Methods

public 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 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 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.