1.怎么设置一个动画
/* Vanzo:zhangshuli on: Mon, 16 Mar 2015 20:42:26 +0000 */ @Override protected void onDestroy() { super.onDestroy(); finish(); overridePendingTransition(0, R.anim.push_bottom_out); android.util.Log.e("zhangshuli", "ondestroy"); } @Override public void finish() { super.finish(); overridePendingTransition(0, R.anim.push_bottom_out); android.util.Log.e("zhangshuli", "finish"); } // End of Vanzo: zhangshuli
2.随便看
<!--in.xml--> <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" > <translate android:duration="3000" android:fromYDelta="100%p" android:toYDelta="0" /> </set> <!--out.xml--> <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" > <translate android:duration="3000" android:fromYDelta="0" android:toYDelta="100%p" /> </set>
3.在代码中设定
<style name="Mms.Theme.Edit.Dialog" parent="@android:style/Theme.Funui.Dialog"> <item name="android:windowAnimationStyle">@style/AnimBottom</item> </style> <style name="AnimBottom" parent="@android:style/Animation.Activity"> <item name="android:activityOpenEnterAnimation">@anim/push_bottom_in</item> <item name="android:activityOpenExitAnimation">@anim/push_bottom_in</item> <item name="android:activityCloseExitAnimation">@anim/push_bottom_out</item> <item name="android:activityCloseEnterAnimation">@anim/push_bottom_out</item> </style> </resources>
4.其他方式
时间: 2024-10-13 00:16:12