开发者

how to read svg file

can any开发者_StackOverflow中文版 one tell me which classes supports to read & display svg files in android.


Try this

https://launchpad.net/libsvg-android

as found in this other question SVG to Android Shape


AndroidSVG is a third party library and provides classes to render SVG files.

You may also set the width and height of the SVG file.

Following is a sample code snippet to read an SVG File :

val svg = SVG.getFromResource(resources, R.raw.ic_motorcycle_black_24px)

svg.renderToCanvas(canvas)

For full example and working Android application refer Kotlin Android Tutorial - Android Draw SVG to Canvas

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜