|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.android.maps.TrackballGestureDetector
public class TrackballGestureDetector
Analyzes a series of MotionEvent and detects gestures. Right now only very simple gestures are detected: scroll, tap, and double-tap.
Method Summary | |
---|---|
void |
analyze(android.view.MotionEvent ev)
Analyze a MotionEvent. |
float |
getCurrentDownX()
Returns the X-cordinate position of the current tap event. |
float |
getCurrentDownY()
Returns the Y-cordinate position of the current tap event. |
float |
getFirstDownX()
Returns the X-cordinate position of the current double-tap event. |
float |
getFirstDownY()
Returns the Y-cordinate position of the current double-tap event. |
boolean |
isDoubleTap()
Checks whether the current MotionEvent is a double-tap event. |
boolean |
isScroll()
Checks whether the current MotionEvent is a scroll event. |
boolean |
isTap()
Checks whether the current MotionEvent is a single-tap event. |
void |
registerLongPressCallback(java.lang.Runnable runnable)
Register a runnable to be called when a longPress event is detected. |
float |
scrollX()
Returns the X-coordinate position of the current scroll event. |
float |
scrollY()
Returns the Y-coordinate position of the current scroll event. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void analyze(android.view.MotionEvent ev)
ev
- The MotionEvent to analyze.public void registerLongPressCallback(java.lang.Runnable runnable)
runnable
- The runnable to use for the callback.public boolean isScroll()
public float scrollX()
isScroll()
is true.
public float scrollY()
isScroll()
is true.
public boolean isTap()
public float getCurrentDownX()
isTap()
is true.
public float getCurrentDownY()
isTap()
is true.
public boolean isDoubleTap()
public float getFirstDownX()
isDoubleTap()
is true.
public float getFirstDownY()
isDoubleTap()
is true.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |