标签:
Activity间跳转,在startActivity(intent)后面可以重写
public void overridePendingTransition (R.anim.enterAnim, R.anim.exitAnim);
其中enterAnim为进入动画,exitAnim为出去动画。
在drawable文件夹中新建enterAnim.xml文件
<?xml version="1.0" encoding="utf-8"?> <scale xmlns:android="http://schemas.android.com/apk/res/android" android:duration="200" android:fromXScale="0.7" android:fromYScale="0.7" android:toXScale="1" android:pivotX="50%" android:pivotY="50%" android:interpolator="@android:anim/decelerate_interpolator" android:toYScale="1" > </scale>
同理exitAnim.xml
<?xml version="1.0" encoding="utf-8"?> <scale xmlns:android="http://schemas.android.com/apk/res/android" android:duration="200" android:fromXScale="1" android:fromYScale="1" android:toXScale="1" android:pivotX="50%" android:pivotY="50%" android:interpolator="@android:anim/decelerate_interpolator" android:toYScale="1" > </scale>
标签:
原文地址:http://www.cnblogs.com/rockylearnstodevelop/p/4256342.html