accelerate_interpolator.xml
<span style="font-size:14px;"><?xml version="1.0" encoding="utf-8"?> <accelerateInterpolator /></span>decelerate_interpolator.xml
<span style="font-size:14px;"><?xml version="1.0" encoding="utf-8"?> <decelerateInterpolator /></span>
fade_in.xml
<span style="font-size:14px;"><?xml version="1.0" encoding="utf-8"?> <alpha xmlns:android="http://schemas.android.com/apk/res/android" android:duration="@android:integer/config_longAnimTime" android:fromAlpha="0.0" android:interpolator="@anim/decelerate_interpolator" android:toAlpha="1.0" /></span>fade_out.xml
<span style="font-size:14px;"><?xml version="1.0" encoding="utf-8"?> <alpha xmlns:android="http://schemas.android.com/apk/res/android" android:duration="@android:integer/config_mediumAnimTime" android:fromAlpha="1.0" android:interpolator="@anim/accelerate_interpolator" android:toAlpha="0.0" /></span>
<span style="font-size:14px;"><resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="AppBaseTheme" parent="android:Theme.Light"></style> <style name="AppTheme" parent="AppBaseTheme"> <item name="android:windowAnimationStyle">@style/MyAnimation</item> </style> <style name="MyAnimation" parent="@android:style/Animation.Activity"> <item name="android:activityOpenEnterAnimation">@anim/fade_in</item> <item name="android:activityOpenExitAnimation">@anim/fade_out</item> <item name="android:activityCloseEnterAnimation">@anim/fade_in</item> <item name="android:activityCloseExitAnimation">@anim/fade_out</item> </style> </resources></span>
<span style="font-size:14px;"><application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.union.foodunion.WelcomeActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application></span>
<span style="font-size:14px;">overridePendingTransition(R.anim.fade_in, R.anim.fade_out);</span>
原文:http://blog.csdn.net/pengkv/article/details/38682085