Skip to content

Material-Animations

Sample Android app showing how to use built-in Transition animations between activities and views.

Stars
13.5k
Forks
2.4k
Licence
MIT
Language
Java
Last update
7.6 years ago
Type
Learning resource

No commits in over a year — check for forks or alternatives before adopting.

What it is

This is a reference project that explains and demonstrates Android's Transition Framework, the system for animating screens and views. It shows three things: animating content when moving between activities (Explode, Slide, Fade), animating shared elements such as a shared icon between two screens, and animating view changes within one activity. Each concept comes with short Java and XML code examples and screenshots.

  • Add a Slide exit transition and a Fade enter transition between two Android activities
  • Define transitions in XML under res/transition or in Java code
  • Animate a shared icon growing from one screen into another using transitionName and ActivityOptions.makeSceneTransitionAnimation()
  • Define a different return transition so going back uses a different animation than going forward

Great for

  • Android developers learning activity transitions
  • Developers who want copy-able examples of Explode, Slide, and Fade
  • Developers working on shared element animations between activities
  • Students following an introduction to Android UI animation

Not ideal for

  • Anyone needing the latest Android animation APIs, because the README says the project is unmaintained and may not include newer features
  • Non-Android developers, because the examples are specific to the Android framework and Java
Step-by-step guide: how to use Material-AnimationsInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Clone and build from source

    You'll need: Android Studio · Java

    Clone the repository

    git clone https://github.com/lgvalle/Material-Animations
  2. 2

    Run it

    • Clone the repository and open it in Android Studio
    • Open the MainActivity and the transition examples to see the code
    • Run the app on an Android device or emulator
    • Tap the sample elements to see each transition in action
  3. 3

    Get the most out of it

    • Read the step-by-step section on Enter, Exit, Return, and Reenter transitions before copying code
    • Compare the XML and programmatic versions of the same transition to see how they map
    • Use the shared element section as a template by giving both views the same android:transitionName
    • Check the README's Android Arsenal link for related resources, while keeping in mind the project is no longer updated

Downloads

Strengths

  • Clear, step-by-step explanations of how enter, exit, return, and reenter transitions relate
  • Shows both XML and programmatic ways to define the same transition
  • Includes screenshots and examples for each concept

Trade-offs

  • The README states the project is unmaintained, with no further updates planned
  • The last push was in April 2019, so the examples may not reflect current Android versions or APIs
  • The README is truncated and the fragment section is incomplete in what was provided

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.