2

I try to add anim to my app ,but it is not work in Android 7.0 .I can not find the reason . I use the first answer in this question, it works on Android 6.0. this is my code:

 <style name="anim">
 <item name="android:windowEnterAnimation">@anim/fade_in</item>
 <item name="android:windowExitAnimation">@anim/fade_out</item>
 </style>
 getWindow().setWindowAnimations(R.style.anim);
 recreate();
Community
  • 1
  • 1
ilumer
  • 125
  • 1
  • 11

1 Answers1

0

Android 7.0 change the impl

Android SDK 23

mMainThread.requestRelaunchActivity(mToken, null, null, 0, false, null, null, false);

Android SDK 24

 mMainThread.requestRelaunchActivity(mToken, null, null, 0, false, null, null, false,
            false /* preserveWindow */);

it will not reuse window

ilumer
  • 125
  • 1
  • 11