public abstract class TwoFingerGestureDetector extends BaseGestureDetector
| 限定符和类型 | 字段和说明 |
|---|---|
protected float |
currFingerDiffX |
protected float |
currFingerDiffY |
protected float |
prevFingerDiffX |
protected float |
prevFingerDiffY |
context, currEvent, currPressure, gestureInProgress, PRESSURE_THRESHOLD, prevEvent, prevPressure, timeDelta| 构造器和说明 |
|---|
TwoFingerGestureDetector(android.content.Context context) |
| 限定符和类型 | 方法和说明 |
|---|---|
static android.graphics.PointF |
determineFocalPoint(android.view.MotionEvent motionEvent)
Determine (multi)finger focal point (a.k.a. center point between all
fingers)
|
float |
getCurrentSpan()
Return the current distance between the two pointers forming the gesture
in progress.
|
float |
getFocusX() |
float |
getFocusY() |
float |
getPreviousSpan()
Return the previous distance between the two pointers forming the gesture
in progress.
|
protected static float |
getRawX(android.view.MotionEvent event,
int pointerIndex)
MotionEvent has no getRawX(int) method; simulate it pending future API
approval.
|
protected static float |
getRawY(android.view.MotionEvent event,
int pointerIndex)
MotionEvent has no getRawY(int) method; simulate it pending future API
approval.
|
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.
|
protected boolean |
isSloppyGesture(android.view.MotionEvent event)
Check if we have a sloppy gesture.
|
protected void |
updateStateByEvent(android.view.MotionEvent curr) |
getEventTime, getTimeDelta, isInProgress, onTouchEvent, resetStateprotected float prevFingerDiffX
protected float prevFingerDiffY
protected float currFingerDiffX
protected float currFingerDiffY
protected abstract void handleStartProgressEvent(int actionCode,
android.view.MotionEvent event)
BaseGestureDetectorhandleStartProgressEvent 在类中 BaseGestureDetectoractionCode - Action Code from MotionEventevent - MotionEventprotected abstract void handleInProgressEvent(int actionCode,
android.view.MotionEvent event)
BaseGestureDetectorhandleInProgressEvent 在类中 BaseGestureDetectoractionCode - Action Code from MotionEventevent - MotionEventprotected void updateStateByEvent(android.view.MotionEvent curr)
public float getCurrentSpan()
public float getPreviousSpan()
protected static float getRawX(android.view.MotionEvent event,
int pointerIndex)
event - Motion EventpointerIndex - Pointer Indexprotected static float getRawY(android.view.MotionEvent event,
int pointerIndex)
event - Motion EventpointerIndex - Pointer Indexprotected boolean isSloppyGesture(android.view.MotionEvent event)
event - Motion Eventtrue if is sloppy gesture, false if notpublic static android.graphics.PointF determineFocalPoint(android.view.MotionEvent motionEvent)
motionEvent - Motion Eventpublic float getFocusX()
public float getFocusY()