svg files rendering in android


Question

I wrote a program in Android for setting different kinds of images as my background image, but it is not working with svg files. I am not getting any errors, it is not displaying any image and I'm getting a blank screen in my emulator when using svg files. Can any one suggest how to read and display svg files in Android with some code? Or should I convert xml code?

1
5
11/25/2010 8:27:42 AM

Accepted Answer

Check out Batik. It's a library for creating and parsing SVG in java. It's part of the Apache XML Graphics Project.

Update:

As it turns out, getting Batik to work on Android is non-trivial and there are easier ways to work with SVG on Android. See this answer for more detail.

4
5/23/2017 11:58:46 AM

Another alternative is AndroidSVG (http://code.google.com/p/androidsvg/).


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