0

I have retrieved the all the imaged from sd card and displayed in my grid view.On tap on one image icon from the grid it goes to second activity and display that clicked image in the image view.

But now i want to implement that when we flink/swap on image from the second activity then the image should be changed to next/previous.

Please give me solution.

Thanks

void pointer
  • 575
  • 2
  • 8
  • 20

1 Answers1

0

What you are looking for is ViewFlipper with GestureDetector. Here are few links which will get you started with.

http://android-er.blogspot.in/2012/02/implement-swiping-page-effect-using.html

And once you understand the concept, make use of answer here.

gesture Detector is used to detect fling events and view flipper to flip to next element.

Community
  • 1
  • 1
Andro Selva
  • 53,910
  • 52
  • 193
  • 240
  • Ok..But i got error on lines animFlipInForeward=AnimationUtils.loadAnimation(this,R.anim.flipin); animFlipOutForeward=AnimationUtils.loadAnimation(this,R.anim.flipou; animFlipInBackward=AnimationUtils.loadAnimation(this,R.anim.flipin_reverse); animFlipOutBackward=AnimationUtils.loadAnimation(this,R.anim.flipout_reverse); As anim cannot be resolved or not a field – void pointer Jun 06 '12 at 10:40