overridePendingTransition(R.anim.zoomin, R.anim.zoomout);
变小
zoomin.xml:
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator">
<scale android:fromXScale="0.1" android:toXScale="1.0"
android:fromYScale="0.1" android:toYScale="1.0"
android:pivotX="50%p" android:pivotY="50%p"
android:duration="1000" /> <!--动画演示效果时间 -->
<alpha
android:fromAlpha="0.1"
android:toAlpha="1.0"
android:duration="300" />
</set>
变大
zoomout.xml:
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator"
android:zAdjustment="top">
<scale android:fromXScale="1.0" android:toXScale=".5"
android:fromYScale="1.0" android:toYScale=".5"
android:pivotX="50%p" android:pivotY="50%p"
android:duration="1000" /> <!-- 系统内置的动画持续时间 android:duration="@android:integer/config_mediumAnimTime" -->
<alpha
android:fromAlpha="1.0"
android:toAlpha="0"
android:duration="300"/>
</set>