Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which SVG elements are supported by Android studio and which are not?

I know android studio doesn't support all elements in SVG.

So far I know that:

<defs>
<stop>
<use> 
<linearGradient>

are not supported yet.

Here is reference to svg element https://developer.mozilla.org/en-US/docs/Web/SVG/Element

like image 538
Maher Abuthraa Avatar asked May 23 '16 11:05

Maher Abuthraa


People also ask

Does Android studio support SVG?

Android Studio includes a tool called Vector Asset Studio that helps you add material icons and import Scalable Vector Graphic (SVG) and Adobe Photoshop Document (PSD) files into your project as vector drawable resources.

Where do SVG files go Android studio?

You can import an SVG file as a VectorDrawable in Android Studio, follow these steps : "Right-click" on the res folder and select new > Vector Asset. Select the Local File option and browse to your . svg file.

Can Android render SVG?

android-svg supports SVG fairly well. It just doesn't have great support for filters or light sources.


1 Answers

The source code for the converter is here: SVG2Vector.java

From that you can see that, as of now, the following elements are supported (to some extent at least):

<polygon>, <rect>, <circle>, <line>, <path>, <g>

like image 114
Paul LeBeau Avatar answered Sep 16 '22 16:09

Paul LeBeau