Issue
I have found a myriad of libraries in order to use SVG images in Android and avoid the frustrating creation of different resolutions and dropping files for each resolution. This becomes very annoying when the app has many icons or images.
What would be a step-by-step process of the simplest-to-use library for using SVG images in Android?
Also I use Android Studio and Illustrator for generating my icons and images.
Solution
First you need to import SVG files by the following simple steps.
- Right click on your project's drawable folder (app/res/drawable)
- Click New
- Select Vector Asset
If the image is available in your computer then select the local svg
file.
After that, select the image path. An option to change the size of the image is also available at the right side of dialog if you want to. In this way, the SVG image is imported in your project.
After that, for using this image, use the same procedure:
@drawable/yourimagename
Answered By - Pallavi Jain
Answer Checked By - Gilberto Lyons (JavaFixing Admin)