Используйте флиппер вида, например
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ViewFlipper
android:id="@+id/viewflipper"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:id="@+id/page_1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- Put stuff for page 1 -->
</LinearLayout>
<LinearLayout
android:id="@+id/page_2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="INVISIBLE">
<!-- Put stuff for page 2 -->
</LinearLayout>
<LinearLayout
android:id="@+id/page_3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="INVISIBLE">
<!-- Put stuff for page 3 -->
</LinearLayout>
<!-- ... -->
<LinearLayout
android:id="@+id/page_N"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="INVISIBLE">
<!-- Put stuff for page N -->
</LinearLayout>
</ViewFlipper>
</FrameLayout>
Теперь, чтобы переключаться между различными представлениями, вы бы (в вашем Java-файле)
ViewFlipper flipper = (ViewFlipper) findViewById(R.id.viewflipper);
flipper.setInAnimation(AnimationUtils.loadAnimation(mContext, R.anim.exit_slide_right_left));
flipper.setOutAnimation(AnimationUtils.loadAnimation(mContext,R.anim.enter_slide_right_left));
flipper.setDisplayedChild(n);
, который будет скользить, как будто вы двигаетесь вперед, файл анимации выглядит следующим образом:
(enter_slide_right_left.xml)
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate android:fromXDelta="0%" android:toXDelta="-100%"
android:fromYDelta="0%" android:toYDelta="0%"
android:duration="700"/>
</set>
и (exit_slide_right_left.xml)
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:fromXDelta="100%" android:toXDelta="0%"
android:fromYDelta="0%" android:toYDelta="0%"
android:duration="700" />
</set>