public abstract class ScrollDetector
extends android.view.GestureDetector.SimpleOnGestureListener
implements android.view.View.OnTouchListener
View.OnTouchListener
which uses GestureDetector
to recognize scrolling events.Constructor and Description |
---|
ScrollDetector(android.content.Context context) |
Modifier and Type | Method and Description |
---|---|
boolean |
onDown(android.view.MotionEvent e) |
boolean |
onScroll(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float distanceX,
float distanceY) |
abstract void |
onScrollDown()
Called when
onScroll(MotionEvent, MotionEvent, float, float) recognize direction of user gesture as DOWN. |
abstract void |
onScrollUp()
Called when
onScroll(MotionEvent, MotionEvent, float, float) recognize direction of user gesture as UP. |
boolean |
onTouch(android.view.View v,
android.view.MotionEvent event) |
void |
setIgnore(boolean ignore)
Disable/enable handling of
onScroll(MotionEvent, MotionEvent, float, float) . |
public abstract void onScrollDown()
onScroll(MotionEvent, MotionEvent, float, float)
recognize direction of user gesture as DOWN.public abstract void onScrollUp()
onScroll(MotionEvent, MotionEvent, float, float)
recognize direction of user gesture as UP.public void setIgnore(boolean ignore)
onScroll(MotionEvent, MotionEvent, float, float)
.ignore
- true - disable, false - enablepublic boolean onTouch(android.view.View v, android.view.MotionEvent event)
onTouch
in interface android.view.View.OnTouchListener
public boolean onDown(android.view.MotionEvent e)
onDown
in interface android.view.GestureDetector.OnGestureListener
onDown
in class android.view.GestureDetector.SimpleOnGestureListener
public boolean onScroll(android.view.MotionEvent e1, android.view.MotionEvent e2, float distanceX, float distanceY)
onScroll
in interface android.view.GestureDetector.OnGestureListener
onScroll
in class android.view.GestureDetector.SimpleOnGestureListener