Is there any working example where gestures are implemented on top of ScrollView? My ScrollView supports vertical scrolling only (no need to have horizontal scrolling). I would like to add gestures to change displayed text (article) by 'scrolling' from left to right. I've added the code in accordance with the tutorial, but it doesn't work.
Asked
Active
Viewed 427 times
1
-
did you try onFling method ?? – Siva Kumar Mar 28 '11 at 06:51
-
no, I haven't used it yet. Will try then. Thanks. – LA_ Mar 28 '11 at 13:48
1 Answers
1
If you are using onFling().. try adding this method in your code
@Override
public boolean dispatchTouchEvent(MotionEvent mEvent){
super.dispatchTouchEvent(mEvent);
return gestureScanner.onTouchEvent(mEvent);
}
Hope it works ...

Siva Kumar
- 893
- 4
- 14
- 28
-
-
If I use code from the following question - http://stackoverflow.com/questions/937313/android-basic-gesture-detection - which class this method should be added in? – LA_ Mar 28 '11 at 20:43
-
Thanks for your code! Also I used code from http://www.codeshogun.com/blog/2009/04/16/how-to-implement-swipe-action-in-android/ and now it works for me. – LA_ Mar 29 '11 at 17:49