DEV Community

Uday
Uday

Posted on

How to convert and use SVG in an android app

How to convert jpg or png to SVG

To use SVG in android there are a number of ways but the one i used was to create a vector of a SVG and then putting that into a drawable. It sounds straightforward but it was not for me, had to solve some pesky issues before i got it working.

First, convert your png or jpg to SVG using any online tool, you can find it on google.
Then create a vector drawable with that SVG by going to below link:

svg2vector

Now put that xml in your drawable folder and then you can use that in your ImageView resource.

Top comments (0)