
This example will explain you how to create your custom animation with fragment transition. Create an Animator based on the differences that will animate the views from one scene to the other.Capture the state of each view in both the start and end scenes.When a scene changes, a Transition has two main responsibilities −

A scene defines a given state of an application's UI, whereas a transition defines the animated change between two scenes. The framework is built around two key concepts: scenes and transitions. Introduced in KitKat, the transition framework provides a convenient API for animating between different UI states in an application.

Activity and Fragment transitions in Lollipop are built on top of a relatively new feature in Android called Transitions.
