How do I export Android XML vector drawables to another format? How do I export Android XML vector drawables to another format? xml xml

How do I export Android XML vector drawables to another format?


I did it by creating an SVG file and copying the value of the pathData attribute of the path element in the XML file and pasting it into the d attribute of the path element in the SVG file. I then converted it to PNG using ImageMagick.

So

<path android:pathData="[Path Data]">

becomes

<path d="[Path Data]">.

Then

convert -background none image.svg image.png

in the command line.

If there is a better way of doing this please post it.


After using the trick Questioner provide, I use a browser to open the svg file, zoom-in to the size as big as possible and take a screenshot. FYI.