

To this end, having an understanding of what these path commands mean can help greatly. Also, it helps to know how each of these commands will cause the graphic to move/change in order to animate the image. If you wish to animate a VectorDrawable, as is all the rage these days, one of the requirements is that the VectorDrawable you are animating from and to should share the same number of commands. Why bother to understand these commands? I just get them as an SVG! In effect, VectorDrawables contains path commands on (how to draw lines and arcs) and just like Path commands when working with Canvas, drawing and rendering VectorDrawables is time and memory consuming process which is why VectorDrawable’s are best used for simple flat graphics. This makes bundling of images with different densities unnecessary, hence saving you a lot of APK bloat. Unlike popular image formats like Bitmap, JPEG, GIF and PNG, Vectors do not lose quality as they are scaled up or down. What is a VectorDrawableĪ VectorDrawable is an XML representation of a Vector. For the rest of us, it can be a bit of a mystery.

Those who works with Paths on a regular basis may be able to interpret this command and tell you what shape it makes. Open any VectorDrawable XML file and you are greeted with some cryptic commands in the pathData attribute. If you want to animate Vectors, you need to understand what these commands mean.
