1.res-anim中添加文件
(1)dialog_left_in.xml
<?xml version&#61;"1.0" encoding&#61;"utf-8"?>
<set xmlns:android&#61;"http://schemas.android.com/apk/res/android"><translateandroid:duration&#61;"400"android:fromXDelta&#61;"-100%p" />
</set>
&#xff08;2&#xff09;push_left_out.xml
<?xml version&#61;"1.0" encoding&#61;"utf-8"?>
<set xmlns:android&#61;"http://schemas.android.com/apk/res/android"><translate android:fromXDelta&#61;"0" android:toXDelta&#61;"100%p"android:interpolator&#61;"&#64;android:anim/accelerate_decelerate_interpolator"android:duration&#61;"300" />
</set>
&#xff08;3&#xff09;push_right_in.xml
<?xml version&#61;"1.0" encoding&#61;"utf-8"?>
<set xmlns:android&#61;"http://schemas.android.com/apk/res/android"><translate android:fromXDelta&#61;"100%" android:toXDelta&#61;"0"android:interpolator&#61;"&#64;android:anim/accelerate_decelerate_interpolator"android:duration&#61;"300" />
</set>
&#xff08;4&#xff09;push_right_out.xml
<?xml version&#61;"1.0" encoding&#61;"utf-8"?>
<set xmlns:android&#61;"http://schemas.android.com/apk/res/android"><translate android:fromXDelta&#61;"0" android:toXDelta&#61;"-100%"android:interpolator&#61;"&#64;android:anim/accelerate_decelerate_interpolator"android:duration&#61;"300" />
</set>
2.res—style中添加style
<!--页面跳转动画-->
<style name&#61;"ActivityStyle"><item name&#61;"&#64;android:activityOpenEnterAnimation">&#64;anim/push_right_in</item><item name&#61;"&#64;android:activityOpenExitAnimation">&#64;anim/push_right_out</item><item name&#61;"&#64;android:activityCloseEnterAnimation">&#64;anim/dialog_left_in</item><item name&#61;"&#64;android:activityCloseExitAnimation">&#64;anim/push_left_out</item>
</style>
3.在自己的style中引用ActivityStyle
<item name&#61;"&#64;android:windowAnimationStyle">&#64;style/ActivityStyle</item>