0

I have a several buttons in the first layout in the viewflipper, and I would like to know how I can swipe over the buttons and switch to the second layout that is also in the viewflipper.

Sathyajith Bhat
  • 21,321
  • 22
  • 95
  • 134
Eli Revah
  • 3,626
  • 7
  • 27
  • 33

1 Answers1

3

To swipe between layouts in a ViewFlipper use the following methods

showPrevious()

showNext()

or

startFlipping()

the first two methods are derived from the parent class ViewAnimator

For an example please refer to the following link:

http://dj-android.blogspot.in/2012/03/view-flipper-example-android.html

Of course in your case, you should trigger the showPrevious/showNext/startFlipping in the onClick method for your button

Soham
  • 4,940
  • 3
  • 31
  • 48