0

I want to change animations for popup menu.

I have two xml file related to animation action information in res/anim.

And I tried to do it but it did not work. Do I use PopupWindow?

styles.xml

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
     ...
    <item name="android:dropDownListViewStyle">@style/PopupMenuTheme</item>
</style>

<style name="PopupMenuTheme" parent="Widget.AppCompat.PopupMenu">
     ...
    <item name="android:windowAnimationStyle">@style/AnimationTheme</item>
</style>

<style name="AnimationTheme">
    <item name="android:windowEnterAnimation">@anim/translate_down</item>
    <item name="android:windowExitAnimation">@anim/translate_up</item>
</style>
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
  • This should help https://stackoverflow.com/questions/9247792/how-to-make-animation-for-popup-window-in-android/12436853 – Rohit5k2 Dec 10 '19 at 09:02
  • @Rohit5k2 I saw it but the problem is I am using popup menu, not popup window. I can't find `setAnimationStyle` in popup menu.. Anyway thank you. – user11431594 Dec 10 '19 at 09:07

0 Answers0