How to detect scrolling action in Android?
I have a horiz开发者_开发问答ontal scroll view, and I want to detect a scrolling action ,
1) is there a listener to detect when the user make scrolling ?
2) and can I know whether the scroll is left to right or right to left ?
EDIT :what is the required listener in HorizontalScrollView ? I don't find OnScrollListener !
You need to go for Gestures. You will have callback methods like
- onScroll(MotionEvent e1, MotionEvent e2, float distanceX,float distanceY)
- onFling(MotionEvent e1, MotionEvent e2, float velocityX,float velocityY)
精彩评论