@UiThread public class ShoveGestureDetector extends ProgressiveGesture<ShoveGestureDetector.OnShoveGestureListener>
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
ShoveGestureDetector.OnShoveGestureListener
Listener for shove callbacks.
|
static class |
ShoveGestureDetector.SimpleOnShoveGestureListener |
context, listener| 构造器和说明 |
|---|
ShoveGestureDetector(android.content.Context context,
PalmapGesturesManager gesturesManager) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected boolean |
analyzeMovement() |
protected boolean |
canExecute(int invokedGestureType) |
protected void |
gestureStopped() |
float |
getDeltaPixelSinceLast()
Returns last vertical pixel delta change
calculated in
ShoveGestureDetector.OnShoveGestureListener.onShove(ShoveGestureDetector, float, float). |
float |
getDeltaPixelsSinceStart()
Returns vertical pixel delta change since the start of the gesture.
|
float |
getMaxShoveAngle()
Get the maximum allowed angle between fingers, measured from the horizontal line, to qualify it as a shove gesture.
|
float |
getPixelDeltaThreshold()
Get the delta pixel threshold required to qualify it as a shove gesture.
|
protected boolean |
isSloppyGesture()
Check if we have a sloppy gesture.
|
protected java.util.Set<java.lang.Integer> |
provideHandledTypes() |
protected void |
reset() |
void |
setMaxShoveAngle(float maxShoveAngle)
Set the maximum allowed angle between fingers, measured from the horizontal line, to qualify it as a shove gesture.
|
void |
setPixelDeltaThreshold(float pixelDeltaThreshold)
Set the delta pixel threshold required to qualify it as a shove gesture.
|
void |
setPixelDeltaThresholdResource(int pixelDeltaThresholdDimen)
Set the delta dp threshold required to qualify it as a shove gesture.
|
void |
setPixelDeltaThresholdResource(java.lang.String pixelDeltaThresholdDimen) |
analyzeEvent, gestureStarted, interrupt, isInProgress, setEnabledgetCurrentSpan, getCurrentSpanX, getCurrentSpanY, getFocalPoint, getPointersCount, getPreviousSpan, getPreviousSpanX, getPreviousSpanY, getRequiredPointersCount, getSpanThreshold, setSpanThreshold, setSpanThresholdResource, setSpanThresholdResourcegetCurrentEvent, getGestureDuration, getPreviousEvent, isEnabled, onTouchEvent, removeListener, setListenerpublic ShoveGestureDetector(android.content.Context context,
PalmapGesturesManager gesturesManager)
@NonNull protected java.util.Set<java.lang.Integer> provideHandledTypes()
protected boolean analyzeMovement()
protected boolean canExecute(int invokedGestureType)
protected boolean isSloppyGesture()
MultiFingerGestureThanks to Almer Thie (code.almeros.com).
isSloppyGesture 在类中 MultiFingerGesture<ShoveGestureDetector.OnShoveGestureListener>protected void gestureStopped()
protected void reset()
public float getDeltaPixelsSinceStart()
public float getDeltaPixelSinceLast()
ShoveGestureDetector.OnShoveGestureListener.onShove(ShoveGestureDetector, float, float).public float getPixelDeltaThreshold()
public void setPixelDeltaThreshold(float pixelDeltaThreshold)
We encourage to set those values from dimens to accommodate for various screen sizes.
pixelDeltaThreshold - delta thresholdpublic void setPixelDeltaThresholdResource(@DimenRes
int pixelDeltaThresholdDimen)
pixelDeltaThresholdDimen - delta thresholdpublic void setPixelDeltaThresholdResource(java.lang.String pixelDeltaThresholdDimen)
public float getMaxShoveAngle()
public void setMaxShoveAngle(float maxShoveAngle)
maxShoveAngle - maximum allowed angle