10

Does android have any support for viewing SVG files or are there any 3rd party SVG viewers for the Android platform?

Tawani
  • 11,067
  • 20
  • 82
  • 106

4 Answers4

3

I use http://code.google.com/p/svg-android/ in my application with satisfaction. All my graphic resources are stored in svg format and rendered on the fly.

Now I'm using a fork of the original project: https://github.com/japgolly/svg-android

Simply include the .java files into your project and use them. This fork bring some improvements to the original code.

Obviously you need to code a little to build up your own SVG viewer. But it's very simple:

SVG svg = new SVGBuilder()
            .readFromResource(getResources(), R.raw.someSvgResource)
            .build();

Drawable drawable = svg.createDrawable();
imageView.setImageDrawable(drawable);

So all you need it's a ImageView component on your activity.

EDIT 2013-06-08:

I suggest to try also this project:

http://www.codeproject.com/Articles/136239/Android-ImageView-and-Drawable-with-SVG-Support

that has its own SVG parser.

Seraphim's
  • 12,559
  • 20
  • 88
  • 129
1

No native support AFAIK. There's this TinyLine. Haven't actually tried it myself though.

Mirko N.
  • 10,537
  • 6
  • 38
  • 37
0

May be you'll be able to do this with opera widgets when Opera 10.50 comes to android. Here's an SVG viewing Opera widget which works for desktop.

Spadar Shut
  • 15,111
  • 5
  • 47
  • 54
-1

Yes. It is a lite svg viewer:
SVG Viewer

Rahiil
  • 110
  • 1
  • 11