0

I want to make an activity where i want to use multiple images and want to swipe it in the same activity.

can anyone help me with the code here because i m new to android and i tried reading the gesture class but couldnt figure out the proper solution..

i have four imageViews with me and using a single activity class would like to change the views using a swipe!!!

i also tried using the gestureDetector class but it is deprecated from android!!

Janusz
  • 187,060
  • 113
  • 301
  • 369
Sudhir91
  • 55
  • 1
  • 6
  • 1
    You have to use ViewFlippers. Refer my answer here http://stackoverflow.com/questions/8908862/how-to-set-dymanic-images-to-viewflipper-in-android/8908962#8908962 – Andro Selva Jul 03 '12 at 12:22
  • hey should my layout be linear for the xml?? and wher should i use those methods showprevious and shownext i mean i need it to be called on a swipe so how should i implement them????? – Sudhir91 Jul 04 '12 at 16:42

1 Answers1

0

The easiest way is to create a GalleryView and provide a gallery adapter that contains the images you want to display and you can also slide them with the finger without any need of gesture recognition.

Have a look at this link http://saigeethamn.blogspot.de/2010/05/gallery-view-android-developer-tutorial.html

Fernando Gallego
  • 4,064
  • 31
  • 50