public class TrackballGestureDetector
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
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.
|
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.