What are the pros and cons in using vector drawables
vs. using a set of .png
for Android system icons?
If they're meant for two different things, what are those?
A png is a compressed image. It has a fixed size, if you try to make it bigger or smaller it will need to either duplicate or remove data. Too big or too small and it doesn't look right (too big is worse than too small).
A vector drawable is a series of commands that tell it how to draw something. These commands scale, so a well executed vector drawable will look as good at 1000x1000 as it does at 100x100.
The advantage of a png is its easy to do and relatively fast performance. A vector drawable is slower (you have to execute the commands) and harder to create a good one. But it scales better. If scaling isn't needed, a png is probably what you want. If it is, you may want a vector.
Also note some kinds of images work better for vectors than others- an icon is a good use of a vector. A photograph wouldn't work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With