edent / SuperTinyIcons

Under 1KB each! Super Tiny Icons are miniscule SVG versions of your favourite website and app logos
MIT License
14.7k stars 910 forks source link

Update Android Vector Drawables #802

Open edent opened 1 month ago

edent commented 1 month ago

Currently the list of Android icons is outdated.

Is there an automated way to create them?

jmb commented 1 month ago

I'm just putting some comments here that might help (and also for my reference if I get time to dig deeper and remember how to program in Java!)

The main code to translate from svg to android vector is here: https://android.googlesource.com/platform/tools/base/+/master/sdk-common/src/main/java/com/android/ide/common/vectordrawable/Svg2Vector.java

This github project has done something similar but is very old... https://github.com/ravibhojwani86/Svg2VectorAndroid

There must be a way to import the android libraries and do a conversion using Java directly...

jmb commented 1 month ago

I've actually got something working... Svg2VectorAndroid

It could do with another test, but it should work by cloning that repo alongside SuperTinyIcons, then running:

cd Svg2VectorAndroid
gradle fatJar
java -jar build/libs/Svg2VectorAndroid-31.6.0.jar -s ../SuperTinyIcons/images/svg -o ../SuperTinyIcons/images/android-vector-drawable