放在styles文件夾中
<style name="mypopwindow_anim_style"> <item name="android:windowEnterAnimation">@anim/pop_show</item> <item name="android:windowExitAnimation">@anim/pop_hidden</item> </style>
anim/pop_show.xml
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:duration="1000" android:fromYDelta="100%" android:toYDelta="0" />
<alpha android:duration="1000" android:fromAlpha="0.0" android:toAlpha="1.0" />
</set>
anim/pop_hidden.xml
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:duration="1000" android:fromYDelta="0" android:toYDelta="100%" />
<alpha android:duration="1000" android:fromAlpha="1.0" android:toAlpha="0.0" />
</set>