1

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.

LA_
  • 19,823
  • 58
  • 172
  • 308

1 Answers1

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
  • @Sive Kumar, what is gestureScanner here? – LA_ Mar 28 '11 at 20:17
  • 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