public class StandardScaleGestureDetector extends ProgressiveGesture<StandardScaleGestureDetector.StandardOnScaleGestureListener>
| Modifier and Type | Class and Description |
|---|---|
static class |
StandardScaleGestureDetector.SimpleStandardOnScaleGestureListener |
static interface |
StandardScaleGestureDetector.StandardOnScaleGestureListener
Listener for scale gesture callbacks.
|
context, listener, windowManager| Constructor and Description |
|---|
StandardScaleGestureDetector(android.content.Context context,
AndroidGesturesManager androidGesturesManager) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
analyzeEvent(android.view.MotionEvent motionEvent) |
protected boolean |
analyzeMovement() |
protected void |
gestureStopped() |
float |
getCurrentSpan()
Return the average distance between each of the pointers forming the
gesture in progress through the focal point.
|
float |
getCurrentSpanX()
Return the average X distance between each of the pointers forming the
gesture in progress through the focal point.
|
float |
getCurrentSpanY()
Return the average Y distance between each of the pointers forming the
gesture in progress through the focal point.
|
float |
getPreviousSpan()
Return the previous average distance between each of the pointers forming the
gesture in progress through the focal point.
|
float |
getPreviousSpanX()
Return the previous average X distance between each of the pointers forming the
gesture in progress through the focal point.
|
float |
getPreviousSpanY()
Return the previous average Y distance between each of the pointers forming the
gesture in progress through the focal point.
|
protected int |
getRequiredPointersCount() |
float |
getScaleFactor() |
float |
getSpanSinceStartThreshold()
Get the threshold span in pixels between initial fingers position and current needed
for this detector to qualify it as a scale gesture.
|
float |
getStartSpan()
Return the average distance between each of the pointers forming the
gesture in progress through the focal point, when the gesture was started.
|
float |
getStartSpanX()
Return the average X distance between each of the pointers forming the
gesture in progress through the focal point, when the gesture was started.
|
float |
getStartSpanY()
Return the average Y distance between each of the pointers forming the
gesture in progress through the focal point, when the gesture was started.
|
boolean |
isScalingOut()
Check whether user is scaling out.
|
protected boolean |
isSloppyGesture()
Check if we have a sloppy gesture.
|
protected java.util.Set<java.lang.Integer> |
provideHandledTypes() |
protected void |
reset() |
void |
setSpanSinceStartThreshold(float spanSinceStartThreshold)
Set the threshold span in pixels between initial fingers position and current needed
for this detector to qualify it as a scale gesture.
|
void |
setSpanSinceStartThresholdResource(int spanSinceStartThresholdDimen)
Set the threshold span in dp between initial fingers position and current needed
for this detector to qualify it as a scale gesture.
|
gestureStarted, interrupt, isInProgress, setEnabledcanExecute, getCurrentSpan, getCurrentSpanX, getCurrentSpanY, getFocalPoint, getPointersCount, getPreviousSpan, getPreviousSpanX, getPreviousSpanY, getSpanThreshold, setSpanThreshold, setSpanThresholdResourcegetCurrentEvent, getGestureDuration, getPreviousEvent, isEnabled, onTouchEvent, removeListener, setListenerpublic StandardScaleGestureDetector(android.content.Context context,
AndroidGesturesManager androidGesturesManager)
protected boolean analyzeMovement()
analyzeMovement in class MultiFingerGesture<StandardScaleGestureDetector.StandardOnScaleGestureListener>protected void gestureStopped()
gestureStopped in class ProgressiveGesture<StandardScaleGestureDetector.StandardOnScaleGestureListener>protected void reset()
reset in class MultiFingerGesture<StandardScaleGestureDetector.StandardOnScaleGestureListener>protected boolean analyzeEvent(android.view.MotionEvent motionEvent)
analyzeEvent in class ProgressiveGesture<StandardScaleGestureDetector.StandardOnScaleGestureListener>protected int getRequiredPointersCount()
protected boolean isSloppyGesture()
MultiFingerGestureThanks to Almer Thie (code.almeros.com).
isSloppyGesture in class MultiFingerGesture<StandardScaleGestureDetector.StandardOnScaleGestureListener>protected java.util.Set<java.lang.Integer> provideHandledTypes()
provideHandledTypes in class ProgressiveGesture<StandardScaleGestureDetector.StandardOnScaleGestureListener>public boolean isScalingOut()
public float getSpanSinceStartThreshold()
public void setSpanSinceStartThreshold(float spanSinceStartThreshold)
We encourage to set those values from dimens to accommodate for various screen sizes.
spanSinceStartThreshold - delta span thresholdpublic void setSpanSinceStartThresholdResource(int spanSinceStartThresholdDimen)
spanSinceStartThresholdDimen - delta span thresholdpublic float getScaleFactor()
public float getStartSpan()
public float getStartSpanX()
public float getStartSpanY()
public float getCurrentSpan()
public float getCurrentSpanX()
public float getCurrentSpanY()
public float getPreviousSpan()
public float getPreviousSpanX()
public float getPreviousSpanY()