androidsvgdrawable-plugin icon indicating copy to clipboard operation
androidsvgdrawable-plugin copied to clipboard

Support XML vector drawables

Open schildbach opened this issue 10 years ago • 8 comments

Vector drawables are basically a subset of SVG, but on Android 5+ they can be used directly, instead of bitmaps. It would be nice if I could use this plugin to generate a couple of fallback bitmaps for the older Android versions.

schildbach avatar May 30 '15 08:05 schildbach

https://developer.android.com/reference/android/graphics/drawable/VectorDrawable.html https://github.com/inloop/svg2android https://github.com/telly/MrVector

avianey avatar May 30 '15 11:05 avianey

Will try but maybe later... The primary goal of this plugin is to generate drawable/mipmap for every density from a scalable vector graphic (svg)... VectorDrawable are actually already scalable so I doupt it needs to be added in this plugin or might be generated into drawable-v21

avianey avatar May 30 '15 11:05 avianey

On API 21 and above, of course the vector drawables would be used directly. I was just looking for a way to generate the fallback PNG drawables for API 20 and below automatically and thought this project would fit.

schildbach avatar May 30 '15 11:05 schildbach

Can look after VectorDrawableCompat

avianey avatar May 30 '15 12:05 avianey

VectorDrawableCompat is meant for runtime, and it's a pain to use. I'm looking for an easy solution at build time.

schildbach avatar May 30 '15 13:05 schildbach

Have to see the spec. Should be easy to convert to svg using xslt...

avianey avatar May 30 '15 13:05 avianey

I'm watching the "What’s new in Android Development Tools" talk from this year's Google I/O and guess what, at the 3 minute mark they announce just this feature (+ big applause). Now I'm looking for how to use it.

schildbach avatar May 30 '15 18:05 schildbach

v 1.4.0-beta1 of http://tools.android.com/tech-docs/new-build-system add the functionnality

Vector drawable support for generating PNGs at build time.

avianey avatar Sep 11 '15 09:09 avianey