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.

2
  • did you try onFling method ?? Commented Mar 28, 2011 at 6:51
  • no, I haven't used it yet. Will try then. Thanks. Commented Mar 28, 2011 at 13:48

1 Answer 1

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 ...

Sign up to request clarification or add additional context in comments.

3 Comments

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.