Animated view as serial pages

I have three views in one place. I need to show them as if they are on a serial page.

enter image description here

When btn1 clicked view1 it needs to be shown. When I change the view to view3, view 1 and 2 must slide to the left for the user to treat these views as sequential, like in Figure.

+3


source to share


2 answers


For your requirement, you have to use ViewFlipper and animation . Below is a description of using ViewFlipper and animation. Understand the code in this example and change it to your actual layouts and requirements.

Android transitions - slide and slide



You can also use ViewPager, but that's what is typical than ViewFlipper.

+3


source


The best solution is ViewPager http://developer.android.com/reference/android/support/v4/view/ViewPager.html



ViewFlipper can be very helpful in some cases http://developer.android.com/reference/android/widget/ViewFlipper.html

0


source







All Articles