public final class GestureSupport
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
GestureSupport.GestureState |
Modifier and Type | Field and Description |
---|---|
private double |
multiplierX |
private double |
multiplierY |
private GestureSupport.GestureState |
rotating |
private GestureSupport.GestureState |
scrolling |
private GestureSupport.GestureState |
swiping |
private static double |
THRESHOLD_EXPANSION |
private static double |
THRESHOLD_ROTATE |
private static double |
THRESHOLD_SCALE |
private static double |
THRESHOLD_SCROLL |
private double |
totalExpansion |
private double |
totalRotation |
private double |
totalScale |
private double |
totalScrollX |
private double |
totalScrollY |
private GestureSupport.GestureState |
zooming |
private boolean |
zoomWithExpansion |
Constructor and Description |
---|
GestureSupport(boolean zoomWithExpansion) |
Modifier and Type | Method and Description |
---|---|
TouchInputSupport.TouchCountListener |
createTouchCountListener() |
void |
handleDeltaRotation(View view,
int modifiers,
boolean isDirect,
boolean isInertia,
int x,
int y,
int xAbs,
int yAbs,
double rotation) |
void |
handleDeltaScrolling(View view,
int modifiers,
boolean isDirect,
boolean isInertia,
int touchCount,
int x,
int y,
int xAbs,
int yAbs,
double dx,
double dy,
double multiplierX,
double multiplierY) |
void |
handleDeltaZooming(View view,
int modifiers,
boolean isDirect,
boolean isInertia,
int x,
int y,
int xAbs,
int yAbs,
double scale,
double expansion) |
void |
handleRotationEnd(View view,
int modifiers,
boolean isDirect,
boolean isInertia,
int x,
int y,
int xAbs,
int yAbs) |
void |
handleScrollingEnd(View view,
int modifiers,
int touchCount,
boolean isDirect,
boolean isInertia,
int x,
int y,
int xAbs,
int yAbs) |
static void |
handleScrollingPerformed(View view,
int modifiers,
boolean isDirect,
boolean isInertia,
int touchCount,
int x,
int y,
int xAbs,
int yAbs,
double dx,
double dy,
double multiplierX,
double multiplierY) |
void |
handleSwipe(View view,
int modifiers,
boolean isDirect,
boolean isInertia,
int touchCount,
int dir,
int x,
int y,
int xAbs,
int yAbs) |
void |
handleSwipeEnd(View view,
int modifiers,
boolean isDirect,
boolean isInertia,
int x,
int y,
int xAbs,
int yAbs) |
static void |
handleSwipePerformed(View view,
int modifiers,
boolean isDirect,
boolean isInertia,
int touchCount,
int dir,
int x,
int y,
int xAbs,
int yAbs) |
void |
handleTotalRotation(View view,
int modifiers,
boolean isDirect,
boolean isInertia,
int x,
int y,
int xAbs,
int yAbs,
double rotation) |
void |
handleTotalScrolling(View view,
int modifiers,
boolean isDirect,
boolean isInertia,
int touchCount,
int x,
int y,
int xAbs,
int yAbs,
double dx,
double dy,
double multiplierX,
double multiplierY) |
void |
handleTotalZooming(View view,
int modifiers,
boolean isDirect,
boolean isInertia,
int x,
int y,
int xAbs,
int yAbs,
double scale,
double expansion) |
void |
handleZoomingEnd(View view,
int modifiers,
boolean isDirect,
boolean isInertia,
int x,
int y,
int xAbs,
int yAbs) |
boolean |
isRotating() |
boolean |
isScrolling() |
boolean |
isSwiping() |
boolean |
isZooming() |
private static double |
multiplicativeDelta(double from,
double to) |
private int |
setRotating(boolean isInertia) |
private int |
setScrolling(boolean isInertia) |
private int |
setSwiping(boolean isInertia) |
private int |
setZooming(boolean isInertia) |
private static final double THRESHOLD_SCROLL
private static final double THRESHOLD_SCALE
private static final double THRESHOLD_EXPANSION
private static final double THRESHOLD_ROTATE
private final GestureSupport.GestureState scrolling
private final GestureSupport.GestureState rotating
private final GestureSupport.GestureState zooming
private final GestureSupport.GestureState swiping
private double totalScrollX
private double totalScrollY
private double totalScale
private double totalExpansion
private double totalRotation
private double multiplierX
private double multiplierY
private boolean zoomWithExpansion
private static double multiplicativeDelta(double from, double to)
private int setScrolling(boolean isInertia)
private int setRotating(boolean isInertia)
private int setZooming(boolean isInertia)
private int setSwiping(boolean isInertia)
public boolean isScrolling()
public boolean isRotating()
public boolean isZooming()
public boolean isSwiping()
public void handleScrollingEnd(View view, int modifiers, int touchCount, boolean isDirect, boolean isInertia, int x, int y, int xAbs, int yAbs)
public void handleRotationEnd(View view, int modifiers, boolean isDirect, boolean isInertia, int x, int y, int xAbs, int yAbs)
public void handleZoomingEnd(View view, int modifiers, boolean isDirect, boolean isInertia, int x, int y, int xAbs, int yAbs)
public void handleSwipeEnd(View view, int modifiers, boolean isDirect, boolean isInertia, int x, int y, int xAbs, int yAbs)
public void handleTotalZooming(View view, int modifiers, boolean isDirect, boolean isInertia, int x, int y, int xAbs, int yAbs, double scale, double expansion)
public void handleTotalRotation(View view, int modifiers, boolean isDirect, boolean isInertia, int x, int y, int xAbs, int yAbs, double rotation)
public void handleTotalScrolling(View view, int modifiers, boolean isDirect, boolean isInertia, int touchCount, int x, int y, int xAbs, int yAbs, double dx, double dy, double multiplierX, double multiplierY)
public void handleDeltaZooming(View view, int modifiers, boolean isDirect, boolean isInertia, int x, int y, int xAbs, int yAbs, double scale, double expansion)
public void handleDeltaRotation(View view, int modifiers, boolean isDirect, boolean isInertia, int x, int y, int xAbs, int yAbs, double rotation)
public void handleDeltaScrolling(View view, int modifiers, boolean isDirect, boolean isInertia, int touchCount, int x, int y, int xAbs, int yAbs, double dx, double dy, double multiplierX, double multiplierY)
public void handleSwipe(View view, int modifiers, boolean isDirect, boolean isInertia, int touchCount, int dir, int x, int y, int xAbs, int yAbs)
public static void handleSwipePerformed(View view, int modifiers, boolean isDirect, boolean isInertia, int touchCount, int dir, int x, int y, int xAbs, int yAbs)
public static void handleScrollingPerformed(View view, int modifiers, boolean isDirect, boolean isInertia, int touchCount, int x, int y, int xAbs, int yAbs, double dx, double dy, double multiplierX, double multiplierY)
public TouchInputSupport.TouchCountListener createTouchCountListener()