Member-only story
Introduction to Animated Vector Drawable (AVD) for Android
What is an AVD?
Starting with Android Lollipop 5.0 API 21, the introduction of the AnimatedVectorDrawable
class — and its backward-compatible counterpart — brought with them a new and powerful way of defining animations in the Android ecosystem through the use of XML. These components can be defined in one .xml
file, or three different ones according to the official documentation.
Shortly after in Android Nougat 7.1 API 25, Android made this feature even more powerful by allowing these animations to run outside the main thread, and instead run in the render thread. This enables the UI thread to firmly focus on the application’s main UI components and not spend time on animations.
In this article, I’ll explore the class of AnimatedVectorDrawable
further, and explain how to both create and use instances of this powerful class inside your Android application, in order to integrate animated icons with ease.
The Shape Shifter App
The Shape Shifter web application is a project created by Alex Lockwood that helps with the creation of animated icons for Android, iOS, and the web. The Shape Shifter app uses the icon animation techniques established in this article by the same author.