How to implement Android 5, Lollipop, Activity Transitions using fragments?
The API is pretty similar to Activity Transitions, albeit limited in some ways due to the difference between starting an activity and a fragment transaction.
Here are the basics:
android:transitionName
or View.setTransitionName
on the views you intend to share between the fragmentsFragmentTransaction.addSharedElement(View sharedElement, String name)
with the view you intend to share (and its transition name).Transition
that you want to be run on the fragment via: Fragment.setSharedElementEnterTransition(Transition transition)
TransitionSet
to aggregate them.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With