Activity and Fragment transitions in Lollipop are built on top of a relatively new feature in Android called
Transitions. Introduced in KitKat, the transition framework provides a convenient API for animating between different UI states in an application. The framework is built around two key concepts: scenes and transitions. A scene defines a given state of an application’s UI, whereas a transition defines the animated change between two scenes.
When a scene changes, a
Transition has two main responsibilities:
- Capture the state of each view in both the start and end scenes, and
- Create an
Animatorbased on the differences that will animate the views from one scene to the other.