public class ShoveGestureDetector extends ProgressiveGesture<ShoveGestureDetector.OnShoveGestureListener>
| Modifier and Type | Class and Description |
|---|---|
static interface |
ShoveGestureDetector.OnShoveGestureListener
Listener for shove callbacks.
|
static class |
ShoveGestureDetector.SimpleOnShoveGestureListener |
context, listener, windowManager| Constructor and Description |
|---|
ShoveGestureDetector(Context context,
AndroidGesturesManager gesturesManager) |
| Modifier and Type | Method and Description |
|---|---|
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 Set<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.
|
analyzeEvent, gestureStarted, interrupt, isInProgress, setEnabledgetCurrentSpan, getCurrentSpanX, getCurrentSpanY, getFocalPoint, getPointersCount, getPreviousSpan, getPreviousSpanX, getPreviousSpanY, getRequiredPointersCount, getSpanThreshold, setSpanThreshold, setSpanThresholdResourcegetCurrentEvent, getGestureDuration, getPreviousEvent, isEnabled, onTouchEvent, removeListener, setListenerpublic ShoveGestureDetector(Context context, AndroidGesturesManager gesturesManager)
protected Set<Integer> provideHandledTypes()
provideHandledTypes in class ProgressiveGesture<ShoveGestureDetector.OnShoveGestureListener>protected boolean analyzeMovement()
analyzeMovement in class MultiFingerGesture<ShoveGestureDetector.OnShoveGestureListener>protected boolean canExecute(int invokedGestureType)
canExecute in class MultiFingerGesture<ShoveGestureDetector.OnShoveGestureListener>protected boolean isSloppyGesture()
MultiFingerGestureThanks to Almer Thie (code.almeros.com).
isSloppyGesture in class MultiFingerGesture<ShoveGestureDetector.OnShoveGestureListener>protected void gestureStopped()
gestureStopped in class ProgressiveGesture<ShoveGestureDetector.OnShoveGestureListener>protected void reset()
reset in class MultiFingerGesture<ShoveGestureDetector.OnShoveGestureListener>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(int pixelDeltaThresholdDimen)
pixelDeltaThresholdDimen - delta thresholdpublic float getMaxShoveAngle()
public void setMaxShoveAngle(float maxShoveAngle)
maxShoveAngle - maximum allowed angle© 2015–2019 Mapbox. All rights reserved.