We have a legacy Android project using drawables in the respective drawable folders for mdpi, hdpi, etc., We are planning to remove the PNG files and transition to SVG. The SVG Import UI described here creates the drawables xml from the svg. Is there a way to run this tool from command line so that we can automate the conversion from SVG to Android Drawable.xml format. We have a lot of files, so doing it manually is tedious. (Alternatively, if this is not possible, I will be writing a script to convert from SVG to Android Drawable.xml format. If such a tool already exists it will be very helpful.)
Thanks.
The converter code from Android Studio can be found here:
SVG2Vector.java
It should be fairly easy to extract it and turn it into a command line utility.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With