I have 2 fragments the first contains a button which on clicked opens a fragment with a ListView
in it. I have a shared element transition for the button to transition into the new fragment (root layout) but I would also like to have this transition in reverse (the list fragment contracts into the button again).
However currently I detect the list item click and send an event to the Activity which pops the listview fragment off the backstack (popBackStackImmediate()
) hence does not show the transition.
Is there a good way to allow back navigation while preserving reverse transition to work as well?