SVG to Android Shape


Question

I'm wondering how vector drawing in Android with the Shape class may resemble another vector drawing standard.

Since Shape is a Drawable, and Drawables are usually defined as XML, it sounds a lot like the vector drawing commands in SVG.

My question is this: Has anybody created an XSLT transformation, or other mechanism, for converting an SVG drawing description into Android Shapes?

1
70
6/14/2010 3:25:19 PM

Accepted Answer

The closest thing that I could find was svg4mobile.

While I don't believe that it does transformations to Drawables XML, it does read the svg and make the appropriate calls to the Drawable classes.

6
6/15/2010 9:07:54 PM

Another non-GPL'd library (this one is Apache License 2.0), the one used in Google's Androidify app: svg-android

https://github.com/pents90/svg-android


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon