explaingit

daimajia/androidviewanimations

12,460JavaAudience · developerComplexity · 2/5Setup · easy

TLDR

AndroidViewAnimations is a Java library that lets you add over 60 ready-made visual effects to any element in an Android app with a single line of code using the YoYo API.

Mindmap

mindmap
  root((repo))
    What it does
      Android view animations
      60 plus effects
      One-line YoYo API
    Effect Categories
      Attention effects
      Fade effects
      Slide effects
      Zoom and flip
    Tech Stack
      Java
      Android
      Gradle
    Audience
      Android developers
    Install
      Gradle dependency
      Maven dependency
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a bounce, shake, or flash animation to a button or image in an Android app with one line of code.

USE CASE 2

Animate a UI element sliding in from the edge of the screen when a new screen loads.

USE CASE 3

Apply a Hinge effect to make an element appear to fall off the screen when dismissed.

USE CASE 4

Set a Pulse animation on a notification badge to draw the user's attention to it.

Tech stack

JavaAndroidGradleMaven

Getting it running

Difficulty · easy Time to first run · 5min

Also requires the Android Easing Functions dependency for animation curves.

In plain English

This is a Java library for Android that makes it easy to add visual animations to any element on the screen. Rather than writing animation code from scratch each time, a developer adds this library to a project and picks from a menu of ready-made effects. The API is called YoYo. You call it by naming the animation technique you want, setting a duration in milliseconds, optionally setting a repeat count, and telling it which screen element to animate. The README shows the pattern in a single short line of code. That simplicity is the main appeal. The collection covers over sixty named effects organized by category. Attention effects include Flash, Pulse, Shake, Wobble, Bounce, and Tada. Fade effects cover fading in or out from any direction. Slide effects move elements in and out from the sides, top, or bottom of the screen. Zoom, Rotate, and Flip effects round out the set. There are also a handful of special effects such as Hinge (an element appearing to fall off the screen), RollIn, Landing, and DropOut. Installation is done through a single Gradle or Maven dependency line. The library also depends on a companion project (Android Easing Functions) that handles the curve of how animations accelerate and decelerate, making movements feel more natural. The README was written by a student in China in 2013. A 2019 update notes they went on to work in investment, a detail left in the README as personal history.

Copy-paste prompts

Prompt 1
Using AndroidViewAnimations in my Android app, make a login button shake when the user enters the wrong password.
Prompt 2
Show me how to add AndroidViewAnimations to my Android project with Gradle and then apply a bounce effect to an image when it loads.
Prompt 3
Using the YoYo API from AndroidViewAnimations, animate a card view sliding in from the bottom of the screen and fading in at the same time.
Prompt 4
Which AndroidViewAnimations effect should I use to highlight a new notification badge, and show me the code to apply it?
Open on GitHub → Explain another repo

← daimajia on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.