Animatable2: Part 2

Correctly determining whether to use Animatable2 or Animatable2Compat can be more complex than it may appear. Previously we looked at some of the complexities of using Animatable2 or Animatable2Compat to register for animation callbacks. This is because Animatable2 only appeared in API 23 and later AnimatedVectorDrawableCompat caters for earlier versions. Also, the Android X library…

Animatable2: Part 1

Sometimes we need to receive callback when an AnimatedVectorDrawable starts and ends. The Animatable2 interface makes this possible. It allows an Animatable2.AnimationCallback implementation to be registered which receives relevant callbacks as the animation is played. Things aren’t always as straightforward as they might initially appear. Animatable2 first appeared in API 23, but API 21 was…

Lottie: Delayed Loop

Lottie is a very nice library which enables vector animations that are more complex than can be done using Animated Vector Drawables. The main use-case for Lottie is that it takes animations that are generated using Adobe After Effects (exported using the Bodymovin plugin). After Effects is a tool aimed at designers rather than developers,…

AnimatedIcons: Heart

There is a nice micro-animation library at useanimations.com which contains some useful icon animations. These are all free to use and downloadable at Lottie animations. For those that already use Lottie they can use these animations as-is. It may not be possible to use them in apps which don’t use Lottie, or if there’s no designer that…

AnimatedIcons: Radio Button

There is a nice micro-animation library at useanimations.com which contains some useful animations which are particularly well suited for animated icons. These are all free to use and downloadable at Lottie animations. For those that already use Lottie they can use these animations as-is. However using them is apps which don’t use Lottie, or in cases where…