startActivity后加:
IntentHelper.jump(mContext, MyBalanceActivity.class);
activity.overridePendingTransition(R.anim.pull_in_right, R.anim.pull_out_left);
进去页面后:finish()后加:
overridePendingTransition(R.anim.pull_in_left, R.anim.pull_out_right);
R.anim.pull_in_right//同样在anim文件下面新建一个pull_in_left.xml文件
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@integer/animTime"
android:fromXScale="0%"
android:fromYScale="100%"
android:pivotX="100%"
android:pivotY="100%"
android:toXScale="100%"
android:toYScale="100%"/>
R.anim.pull_out_left
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:duration="@integer/animTime"
android:fromXScale="100%"
android:fromYScale="100%"
android:pivotX="0%"
android:pivotY="0%"
android:toXScale="0%"
android:toYScale="100%"/>
<alpha
android:duration="@integer/animTime"
android:fromAlpha="1"
android:toAlpha="0.2"
>
</alpha>
</set>
R.anim.pull_in_left
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@integer/animTime"
android:fromXScale="0%"
android:fromYScale="100%"
android:pivotX="0%"
android:pivotY="0%"
android:toXScale="100%"
android:toYScale="100%"/>
R.anim.pull_out_right
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:duration="@integer/animTime"
android:fromXScale="100%"
android:fromYScale="100%"
android:pivotX="100%"
android:pivotY="100%"
android:toXScale="0%"
android:toYScale="100%"/>
<alpha
android:duration="@integer/animTime"
android:fromAlpha="1"
android:toAlpha="0.2"
>
</alpha>
</set>
@integer/animTime为400