Does Android support SVG (natively)?
I found old answers here or on the web, but I don't understand the current situation.
Please give a reference if possibile.
Does Android support SVG (natively)?
That depends on what you mean by "Android", "SVG", and "natively".
Android is a mobile operating system. It has multiple versions.
SVG is a standard. It has multiple versions.
"Natively" could mean anything from "I can decode SVG through some Java classes" to "the stock Android Web browser can render SVG".
I can tell you that the stock Android Web browser renders this Web page fine on Android 3.2 and Android 4.0, but fails on Android 2.3.
I can tell you that there is no SVG parser set of Java classes, and that ImageView
and similar widgets have no ability to work with SVG directly. You may be able to use WebView
to display some SVG
, given that the stock browser seems to support it on newer Android versions, though it's conceivable that the SVG support is via some plugin that is not automatically available to WebView
.
I cannot tell you what version of SVG is supported by the browser, as that does not appear to be documented. You would need to run some tests and see if it supports the particular SVG structures that you wish to use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With