can any one tell me which classes supports to read & display svg files in android.
Asked
Active
Viewed 1,623 times
2 Answers
2

Community
- 1
- 1

Jason Rogers
- 19,194
- 27
- 79
- 112
-
i have small dbt,is there any possible to read pdf directly without any third party tool in android without converting to svg – ajay Nov 17 '10 at 06:52
-
no idea (not an expert), id doesn't seem to be supported natively, there are some apps that do it but I don't know if they are lighter. you could pre convert it to images ? (by preconvert I mean if they are in the phone save them as images, if you dl them from a serveur, have the serveur generate an image first). – Jason Rogers Nov 17 '10 at 06:58
-
if doing like that there is problem, when we selecting any text it won't. – ajay Nov 17 '10 at 07:02
-
true, if you editing the pdf my idea becomes useless ^^ sorry. – Jason Rogers Nov 17 '10 at 07:58
0
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

arjun
- 1,645
- 1
- 19
- 19