Search code examples
androidsvgdata-conversionandroid-vectordrawable

Converting SVG file to Android Vector Drawable XML while keeping the group structure in place


I want to convert SVG files to Android Vector Drawable XMLs. I need the structure of the SVG. To the extend that the SVG groups multiple elements together, I need that grouping to also be reflected in the Android Vector Drawable.

Unfortunately, the tools I found to do SVG to Vector Drawable conversions try to minimize the file size in a way that gets rid of existing grouping in the structure of the file.

Is there a smart way to do the conversion that leaves the grouping tree intact?


Solution

  • Have you tried Shape Shifter? Its meant as a program to let you animate vectors and svgs easily, but you can import your .svg and export to a Vector Drawable straight away. It should keep your group structure too (but I make no promises as I haven't done so explicitly myself).