Everyone with an Android device will be familiar with the animated icon. Perhaps the best known example is the way the hamburger icon transforms into an arrow and vice versa when a navigation drawer is opened and closed. The use of vector graphics makes this process remarkably simple. Provided that both the icons have the same number of points, any icon can be transformed into any other.
Using space efficiently is essential on a mobile device, and animating action icons not only looks good, but also saves space and, if applied intelligently, will convey meaning to the user as well.
Vector images are easily transformed from one to another by mapping points on the original image onto the target image. This is done with the AnimatedVectorDrawable class.
There are several methods of animating these drawables. Firstly, we can apply a number of predefined animations,...