I have just figured out that every time I setRetainInstance(true) on a Fragment it works as expected (Fragment data is retained), but this is causing the fragment's custom animation to be executed again after screen rotation.
Is there a way to avoid/disable those animations on screen rotation?
The fragment is created using the following animations:
setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_left, R.anim.slide_in_left, R.anim.slide_out_right);
So, I don't want those "sliding animations" to be executed again on screen rotation.
This is how I handled it
Where R.anim.none is just an animation that does nothing. Good luck.