I have been trying to disable the animation of my activity when calling moveTaskToBack()
. I am testing on my Nexus 7 on Marshmallow, and no matter what I do, the "sliding down" animation is still there.
Things that I have tried:
- Calling
overridePendingTransition(0, 0);
aftermoveTaskToBack()
- Calling
overridePendingTransition(0, 0);
inonDestroy()
andonPause()
- Calling
getWindow().setWindowAnimations(0);
in the above places - Create a custom style for the activity with the following:
.
<item name="android:windowAnimationStyle">@null</item>
<item name="android:windowExitAnimation">@null</item>
<item name="android:activityOpenEnterAnimation">@null</item>
<item name="android:activityOpenExitAnimation">@null</item>
<item name="android:activityCloseEnterAnimation">@null</item>
<item name="android:activityCloseExitAnimation">@null</item>
None of the above and their combination work. I am out of idea. Can someone help me out please?