Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Using {@link android.view.Window#setWindowAnimations(int)} did not work for versions newer
- * than {@link android.os.Build.VERSION_CODES#M} so faking recreate to achieve fade animation.
- * Not setting through theme because don't want to fade in or out if Night Mode did not change.
- */
- @Override
- public void recreate() {
- finish();
- overridePendingTransition(R.anim.anime_fade_in,
- R.anim.anime_fade_out);
- startActivity(getIntent());
- overridePendingTransition(R.anim.anime_fade_in,
- R.anim.anime_fade_out);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement