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.
1 Answer
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 ...
3 Comments
LA_
@Sive Kumar, what is gestureScanner here?
LA_
If I use code from the following question - stackoverflow.com/questions/937313/… - which class this method should be added in?
LA_
Thanks for your code! Also I used code from codeshogun.com/blog/2009/04/16/… and now it works for me.