我有一个带有一些动画的AppCompatDialogFragment
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
dialog.window.attributes.windowAnimations = R.style.FragmentAnimation
}
-
<style name="FragmentAnimation">
<item name="android:windowEnterAnimation">@anim/slide_up</item>
<item name="android:windowExitAnimation">@anim/slide_down</item>
</style>
-
dialogFragment.show(supportFragmentManager, "TAG")
-
一切正常,除非显示对话框,然后关闭然后打开屏幕,然后重新输入动画。怎么解决?