I want to swipe an image from left to right and right to left in an ListItem, I searched so many codes in online, none had solution for me, can anyone help me.
Asked
Active
Viewed 487 times
0
-
see http://stackoverflow.com/questions/4139288/android-how-to-handle-right-to-left-swipe-gestures – Rachel Gallen Feb 04 '13 at 08:13
1 Answers
0
If I understand you correctly, you're looking for something like a ListView that swipes horizontally instead of vertically.
You want a ViewPager:
Here's an example:
http://developer.android.com/training/animation/screen-slide.html
On the adapter's instantiateItem() method (which more or less takes the place of the getView() method in the ListView adapters), simply inflate layouts that contain only your images, rather than text like is shown in the example.
http://developer.android.com/reference/android/support/v4/view/ViewPager.html

drew moore
- 31,565
- 17
- 75
- 112
-
I have 2 ImageViews and 2 TextViews in an ListItem, when I swipe Image1 in left side of the list item, that image has to move to right side and text alignment also has to change accordingly. – Subramanian Feb 04 '13 at 08:44