I want set event when user touch and sliding right -> left: -> " I want set 'Next' event", and sliding left -> right: -> "I want set 'Previous' event". .. in Linerlayout Can you helps me! Thanks so much
Asked
Active
Viewed 177 times
-2
-
your quality of question is poor i think.. – Jigar Pandya Jul 17 '12 at 10:18
1 Answers
0
I implemented this in an app for Cupcake (1.5) using the GestureDetector.OnGestureListener's onFling event. Using the results from that can tell you in what direction a user was dragging their finger when they did a quick swipe, but a slow sliding motion doesn't work very well. There are many other gestures supported via that interface, and I'm sure one will suit your needs nicely.
Luckily there is now also a ViewPager class that (I think) will do exactly what you want it to do. The Android Developer blog has a great post about how to use it here.

Bryan Herbst
- 66,602
- 10
- 133
- 120