public class GestureFilter
extends android.view.GestureDetector.SimpleOnGestureListener
Modifier and Type | Class and Description |
---|---|
static interface |
GestureFilter.SimpleGestureListener
The listener interface for receiving simpleGesture events.
|
Modifier and Type | Field and Description |
---|---|
static int |
MODE_DYNAMIC
The Constant MODE_DYNAMIC.
|
static int |
MODE_SOLID
The Constant MODE_SOLID.
|
static int |
MODE_TRANSPARENT
The Constant MODE_TRANSPARENT.
|
static int |
SWIPE_DOWN
The Constant SWIPE_DOWN.
|
static int |
SWIPE_LEFT
The Constant SWIPE_LEFT.
|
static int |
SWIPE_RIGHT
The Constant SWIPE_RIGHT.
|
static int |
SWIPE_UP
The Constant SWIPE_UP.
|
Constructor and Description |
---|
GestureFilter(android.app.Activity activity,
GestureFilter.SimpleGestureListener sgl)
Instantiates a new gesture filter.
|
Modifier and Type | Method and Description |
---|---|
int |
getMode()
Gets the mode.
|
int |
getSwipeMaxDistance()
Gets the swipe max distance.
|
int |
getSwipeMinDistance()
Gets the swipe min distance.
|
int |
getSwipeMinVelocity()
Gets the swipe min velocity.
|
boolean |
onDoubleTap(android.view.MotionEvent e) |
boolean |
onDoubleTapEvent(android.view.MotionEvent e) |
boolean |
onFling(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float velocityX,
float velocityY) |
boolean |
onSingleTap(android.view.MotionEvent e)
On single tap.
|
boolean |
onSingleTapConfirmed(android.view.MotionEvent e) |
void |
onTouchEvent(android.view.MotionEvent event)
On touch event.
|
void |
setEnabled(boolean status)
Sets the enabled.
|
void |
setMode(int m)
Sets the mode.
|
void |
setSwipeMaxDistance(int distance)
Sets the swipe max distance.
|
void |
setSwipeMinDistance(int distance)
Sets the swipe min distance.
|
void |
setSwipeMinVelocity(int distance)
Sets the swipe min velocity.
|
public static final int SWIPE_UP
public static final int SWIPE_DOWN
public static final int SWIPE_LEFT
public static final int SWIPE_RIGHT
public static final int MODE_TRANSPARENT
public static final int MODE_SOLID
public static final int MODE_DYNAMIC
public GestureFilter(android.app.Activity activity, GestureFilter.SimpleGestureListener sgl)
activity
- the activitysgl
- the sglpublic void onTouchEvent(android.view.MotionEvent event)
event
- the eventpublic void setMode(int m)
m
- the new modepublic int getMode()
public void setEnabled(boolean status)
status
- the new enabledpublic void setSwipeMaxDistance(int distance)
distance
- the new swipe max distancepublic void setSwipeMinDistance(int distance)
distance
- the new swipe min distancepublic void setSwipeMinVelocity(int distance)
distance
- the new swipe min velocitypublic int getSwipeMaxDistance()
public int getSwipeMinDistance()
public int getSwipeMinVelocity()
public boolean onFling(android.view.MotionEvent e1, android.view.MotionEvent e2, float velocityX, float velocityY)
onFling
in interface android.view.GestureDetector.OnGestureListener
onFling
in class android.view.GestureDetector.SimpleOnGestureListener
public boolean onSingleTap(android.view.MotionEvent e)
e
- the epublic boolean onDoubleTap(android.view.MotionEvent e)
onDoubleTap
in interface android.view.GestureDetector.OnDoubleTapListener
onDoubleTap
in class android.view.GestureDetector.SimpleOnGestureListener
public boolean onDoubleTapEvent(android.view.MotionEvent e)
onDoubleTapEvent
in interface android.view.GestureDetector.OnDoubleTapListener
onDoubleTapEvent
in class android.view.GestureDetector.SimpleOnGestureListener
public boolean onSingleTapConfirmed(android.view.MotionEvent e)
onSingleTapConfirmed
in interface android.view.GestureDetector.OnDoubleTapListener
onSingleTapConfirmed
in class android.view.GestureDetector.SimpleOnGestureListener
University of Colorado Denver, Department of Biostatistics and Informatics