0

I'm unable to set return transition between fragment when back button pressed fragment just closed abruptly without smooth slide out transition, here is what I'm trying:

DetailsFragment.setSharedElementEnterTransition(new DetailsTransition());
DetailsFragment.setReturnTransition(new Slide(Gravity.RIGHT));
blackHawk
  • 6,047
  • 13
  • 57
  • 100

1 Answers1

0

According to FlyingNades answer, if you need animation for exiting case you set enter animation to 0 or default animation, like:

fragmentTransaction.setCustomAnimations(0, R.anim.my_exit_animation);

If your fragment still continue to close abruptly, then you may have issue with backstack. You can also give animation for popping from back stack case, like:

fragmentTransaction.setCustomAnimations(0, R.anim.my_exit_animation, 0, R.anim.my_backstack_pop_exit_animation);