Material Slider

Google released Material Components 1.3.0-alpha02 on 16th July 2020. One component that has received a lot of love in this release is the humble slider. There are some nice additions on top of the basic functionality, and in this post we’ll explore them a little.

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…

NumberPicker: Espresso Testing

In the previous article we looked at some of the problems that we can have when working with the largely unloved NumberPicker widget. Another area which can be a little tricky with NumberPicker is when it comes to writing Espresso tests for it. In this article we’ll look at some techniques for creating Espresso tests…

NumberPicker

Recently in my day job I needed to use a NumberPicker which is a control I have not had reason to use for quite a long time. The experience was quite a frustrating one and in this post we’ll look at some of the issues with it, and some work-arounds.

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…

MotionLayout: Visibility

MotionLayout is a wonderful tool for creating complex layout animations. However it does have some foibles which are easy enough to work around, but can initially be baffling. In this post we’ll look at some oddities concerning the visibility of views within the layout.

AnimatedIcons: Infinity

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…