ncapdevi / FragNav

An Android library for managing multiple stacks of fragments
1.5k stars 210 forks source link

popFragment() animations not working when defined in pushFragment() before. #228

Open diegaspar opened 4 years ago

diegaspar commented 4 years ago

I'm setting the animations here fragNavController?.pushFragment( fragment, FragNavTransactionOptions.newBuilder() .customAnimations(enterAnimation, 0, 0, exitAnimation).build()

but when calling fragNavController?.popFragment()? the pop animation is not working.

Any ideas about it?

Kamil-H commented 4 years ago

I can confirm I saw the same behavior. For a workaround I can suggest you to call popFragment() with the same options as you call pushFragment(), so: fragNavController?.popFragment(fragment, FragNavTransactionOptions.newBuilder() .customAnimations(enterAnimation, 0, 0, exitAnimation).build()) should solve your problem.