public class ShoveGestureDetector extends TwoFingerGestureDetector
| Modifier and Type | Class and Description |
|---|---|
static interface |
ShoveGestureDetector.OnShoveGestureListener
Listener which must be implemented which is used by ShoveGestureDetector
to perform callbacks to any implementing class which is registered to a
ShoveGestureDetector via the constructor.
|
static class |
ShoveGestureDetector.SimpleOnShoveGestureListener
Helper class which may be extended and where the methods may be
implemented.
|
currFingerDiffX, currFingerDiffY, prevFingerDiffX, prevFingerDiffYcontext, currEvent, currPressure, gestureInProgress, PRESSURE_THRESHOLD, prevEvent, prevPressure, timeDelta| Constructor and Description |
|---|
ShoveGestureDetector(android.content.Context context,
ShoveGestureDetector.OnShoveGestureListener listener) |
| Modifier and Type | Method and Description |
|---|---|
float |
getShovePixelsDelta()
Return the distance in pixels from the previous shove event to the
current event.
|
protected void |
handleInProgressEvent(int actionCode,
android.view.MotionEvent event)
Called when the current event occurred when a gesture IS in progress.
|
protected void |
handleStartProgressEvent(int actionCode,
android.view.MotionEvent event)
Called when the current event occurred when NO gesture is in progress
yet.
|
protected boolean |
isSloppyGesture(android.view.MotionEvent event)
Check if we have a sloppy gesture.
|
protected void |
resetState() |
protected void |
updateStateByEvent(android.view.MotionEvent curr) |
determineFocalPoint, getCurrentSpan, getFocusX, getFocusY, getPreviousSpan, getRawX, getRawYgetEventTime, getTimeDelta, isInProgress, onTouchEventpublic ShoveGestureDetector(android.content.Context context,
ShoveGestureDetector.OnShoveGestureListener listener)
protected void handleStartProgressEvent(int actionCode,
android.view.MotionEvent event)
BaseGestureDetectorhandleStartProgressEvent in class TwoFingerGestureDetectoractionCode - Action Code from MotionEventevent - MotionEventprotected void handleInProgressEvent(int actionCode,
android.view.MotionEvent event)
BaseGestureDetectorhandleInProgressEvent in class TwoFingerGestureDetectoractionCode - Action Code from MotionEventevent - MotionEventprotected void resetState()
resetState in class BaseGestureDetectorprotected void updateStateByEvent(android.view.MotionEvent curr)
updateStateByEvent in class TwoFingerGestureDetectorprotected boolean isSloppyGesture(android.view.MotionEvent event)
TwoFingerGestureDetectorisSloppyGesture in class TwoFingerGestureDetectorevent - Motion Eventtrue if is sloppy gesture, false if notpublic float getShovePixelsDelta()