Reputation: 3345
can any one tell me which classes supports to read & display svg files in android.
Upvotes: 1
Views: 1731
Reputation: 1203
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
Upvotes: 0
Reputation: 19344
Try this
https://launchpad.net/libsvg-android
as found in this other question SVG to Android Shape
Upvotes: 2