public class Swipe
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SWIPED_THRESHOLD
Swiped threshold is added for neglecting swiping
when differences between changed x or y coordinates are too small
|
static int |
DEFAULT_SWIPING_THRESHOLD
Swiping threshold is added for neglecting swiping
when differences between changed x or y coordinates are too small
|
| Constructor and Description |
|---|
Swipe() |
Swipe(int swipingThreshold,
int swipedThreshold) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
dispatchTouchEvent(android.view.MotionEvent event)
Called to process touch screen events.
|
int |
getSwipedThreshold() |
int |
getSwipingThreshold() |
<any> |
observe()
Observes swipe events with RxJava Observable.
|
void |
setListener(SwipeListener swipeListener)
Adds listener for swipe events.
|
public static final int DEFAULT_SWIPING_THRESHOLD
public static final int DEFAULT_SWIPED_THRESHOLD
public Swipe()
public Swipe(int swipingThreshold,
int swipedThreshold)
public void setListener(SwipeListener swipeListener)
dispatchTouchEvent method as well.swipeListener - listenerpublic <any> observe()
dispatchTouchEvent method as well.public boolean dispatchTouchEvent(android.view.MotionEvent event)
event - MotionEventpublic int getSwipingThreshold()
public int getSwipedThreshold()