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