是否有任何精简版SVG浏览器Android版? [英] Is there any lite SVG viewer for Android?
问题描述
机器人是否有查看SVG文件的任何支持或是否有任何第三方的SVG查看器为Android平台?
Does android have any support for viewing SVG files or are there any 3rd party SVG viewers for the Android platform?
推荐答案
我用 HTTP:在我满意的应用程序//$c$c.google.com/p/svg-android/ 。我所有的图形资源都存储在SVG格式和呈现上飞。
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.
现在我使用的是原始项目的一个分支: https://github.com/japgolly/svg-android
Now I'm using a fork of the original project: https://github.com/japgolly/svg-android
只要包括.java文件到您的项目,并利用它们。这个分支带来一些改进原来的code。
Simply include the .java files into your project and use them. This fork bring some improvements to the original code.
显然,你需要codea的很少建立自己的SVG浏览器。但它是非常简单的:
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);
因此,所有你需要的是你的活动一个ImageView的组成部分。
So all you need it's a ImageView component on your activity.
修改2013年6月8日:
我建议也尝试这个项目:
I suggest to try also this project:
的http://www.$c$cproject.com/Articles/136239/Android-ImageView-and-Drawable-with-SVG-Support
这有它自己的SVG解析器。
that has its own SVG parser.
这篇关于是否有任何精简版SVG浏览器Android版?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!