I have Fragment A which contains two fragments, Fragment B and Fragment C. I want to add fragment B to fragment A using getChildFragmentManager()
then replace it with fragment C by card flip animation using this code
getChildFragmentManager()
.beginTransaction()
.setCustomAnimations(
R.animator.card_flip_right_in, R.animator.card_flip_right_out,
R.animator.card_flip_left_in, R.animator.card_flip_left_out)
.replace(R.id.fragment_new_word_container, new FragmentCardBack())
.addToBackStack(null)
.commit();
Nested Fragments introduced in android 4.2 to use it in earlier versions we can use Support library. everything works great up to here. The problem is FragmentManager in support library doesn't support object animator. So its seems i only have 2 options:
- target api level 4.2 and higher which will cost me more than half of my customers. This is not a suitable option for me!
- Not using nested fragments since animation is essential part of my app.
So is there any other way in which i can use support library nested fragments alongside with flip card animation?