public abstract class BaseGestureDetector
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected android.content.Context |
context |
protected android.view.MotionEvent |
currEvent |
protected float |
currPressure |
protected boolean |
gestureInProgress |
protected static float |
PRESSURE_THRESHOLD
This value is the threshold ratio between the previous combined pressure
and the current combined pressure.
|
protected android.view.MotionEvent |
prevEvent |
protected float |
prevPressure |
protected long |
timeDelta |
| 构造器和说明 |
|---|
BaseGestureDetector(android.content.Context context) |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
getEventTime()
Return the event time of the current GestureDetector event being
processed.
|
long |
getTimeDelta()
Return the time difference in milliseconds between the previous accepted
GestureDetector event and the current GestureDetector event.
|
protected abstract void |
handleInProgressEvent(int actionCode,
android.view.MotionEvent event)
Called when the current event occurred when a gesture IS in progress.
|
protected abstract void |
handleStartProgressEvent(int actionCode,
android.view.MotionEvent event)
Called when the current event occurred when NO gesture is in progress
yet.
|
boolean |
isInProgress()
Returns
true if a gesture is currently in progress. |
boolean |
onTouchEvent(android.view.MotionEvent event)
All gesture detectors need to be called through this method to be able to
detect gestures.
|
protected void |
resetState() |
protected void |
updateStateByEvent(android.view.MotionEvent curr) |
protected final android.content.Context context
protected boolean gestureInProgress
protected android.view.MotionEvent prevEvent
protected android.view.MotionEvent currEvent
protected float currPressure
protected float prevPressure
protected long timeDelta
protected static final float PRESSURE_THRESHOLD
public boolean onTouchEvent(android.view.MotionEvent event)
event - MotionEventtrue as handledprotected abstract void handleStartProgressEvent(int actionCode,
android.view.MotionEvent event)
actionCode - Action Code from MotionEventevent - MotionEventprotected abstract void handleInProgressEvent(int actionCode,
android.view.MotionEvent event)
actionCode - Action Code from MotionEventevent - MotionEventprotected void updateStateByEvent(android.view.MotionEvent curr)
protected void resetState()
public boolean isInProgress()
true if a gesture is currently in progress.true if a gesture is currently in progress, false
otherwise.public long getTimeDelta()
public long getEventTime()