Sofia API Reference

  • Package Index
  • Class Index
  • Packages
  • sofia.app
  • sofia.content
  • sofia.data
  • sofia.graphics
  • sofia.util
  • sofia.view
    • Interfaces
    • RotateGestureDetector.OnRotateGestureListener
    • Classes
    • FlexibleContentView
    • RotateGestureDetector
    • RotateGestureDetector.SimpleOnRotateGestureListener
  • sofia.widget

public static class
RotateGestureDetector.SimpleOnRotateGestureListener

extends Object
implements RotateGestureDetector.OnRotateGestureListener

Inheritance

  • 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.
Methods inherited from class java.lang.Object
Object clone()
boolean equals(Object arg0)
void finalize()
final Class<?> getClass()
int hashCode()
final void notify()
final void notifyAll()
String toString()
final void wait()
final void wait(long arg0, int arg1)
final void wait(long arg0)
Methods inherited from interface sofia.view.RotateGestureDetector.OnRotateGestureListener
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 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, getFocusX() and 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.