Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android Transitions

Android Transitions

An exploration of the Transitions framework for animating the transition between two screens

Bryan Herbst

December 11, 2014

Transcript

10 slides
  1. What is a Transition?  Easy way to animate a

    group of Views  Animates from one Scene to another Scene  Can be used to animate between Activities and Fragments
  2. Scenes  Snapshot of a ViewGroup  Can be defined

    in Java or XML (or let the framework do it)
  3. How it works 1. beginDelayedTransition() => Take a snapshot of

    ViewGroup 2. Update Views 3. On next layout pass, Android takes another snapshot and creates animations Note: you can also define Scenes in XML
  4. Activity Transitions (API 21)  Request Window.FEATURE_ACTIVITY_TRANSITIONS and Window.FEATURE_CONTENT_TRANSITIONS in

    both Activities  Set a transition name on the View in both Activities  Create a Bundle with  Call startActivity(intent, transitionBundle); makeSceneTransitionAnimation(activity, sharedView, viewTransitionName).toBundle();

More Decks by Bryan Herbst

Other Decks in Programming