What is SVG ?
SVG stands for Scalable Vector Graphics.
SVG defines vector-based graphics in XML format.
What is VectorDrawable ?
A VectorDrawable is a vector graphic defined in an XML file as a set of points, lines, and curves along with its associated color information.
Advantage of VectorDrawable over PNG
- It can be scaled without loss of display quality which means the same file is resized for different screen densities without loss of image quality .
- Same file can be used in normal and dark (Just have to apply color tint to vector drawable).
- Helps in reducing APK Size .
1. Right click on resource folder of your project , then click on new and then click on Vector Asset .
2. A popup window will open select Local SVG option and then browse path then select SVG Icon and then click ok .
No comments:
Post a Comment