Closed Donnnno closed 1 year ago
I've only looked at Lawnicons, but from what I understand, instead of generating pngs, they generate xml files of adaptive icons (like this), without the background element.
They seem to create the xml in this class : https://github.com/LawnchairLauncher/lawnicons/blob/develop/svg-processor/src/main/kotlin/app/lawnchair/lawnicons/helper/SvgFilesProcessor.kt.
I'll try to take a closer look in the coming weeks.
Thanks!
We've been experimenting with XML icons in the past, and tried it again today, but it didn't work.
Here is my first attempt at adaptive Material You Arcticons:
https://github.com/Donnnno/Arcticons/assets/88139840/b238b485-7a61-4df4-ac02-c0bca038fafb
Converting the SVG files to XML was actually not necessary for this, I just used references to the existing PNG files for the foreground of the adaptive icons.
Woooooooow! That's awesome! Would love to see more details on this :))
@petlyh How do you get the color to change the instance you apply dark mode. I get them to change but only after i reapply or restart.
@Kaiserdragon2 Unfortunately, that seems to be out of the icon pack's control. Here I'm using Hyperion Launcher, which reloads the icons when the theme changes. Lawnchair does the same if the user enables Themed Icons, but it's not in the latest release yet. Other launchers I've tried like Niagara requires manual reapplying.
Ah thanks for the info this is good to know
Great news! The new version of Candybar has support for VectorDrawables, so that's a nice to have.
Hey @petlyh, would you be interested in making a pr for this? I would love to publish this as a new flavor :-)
I hope it's ok to ask here: has there been progress on this? I'd be super interested to make this a reality for my own icon pack but I'm lacking a lot of understanding of the general workflow, and what would be the limitations and/or downsides.
For example, is it correct that no stock launcher supports this? (For icon packs, specifically.)
@moertel It's actually live already haha
https://play.google.com/store/apps/details?id=com.donnnno.arcticons.you
Limitations are that a few launcher support it correctly. On Android 11 and older the icons are black & white.
As for all the technical stuff, @Kaiserdragon2 did a lot of scripting to make all of this work
@moertel To give a bit more insight in the process:
Our preparerelease script has some code that changes the lines to the material you values: https://github.com/Donnnno/Arcticons/blob/b3d9bf8b4f0adadb0fb445d54ccbadb0ae490840/other/scripts/preparerelease.py#L62C1-L230C62 & https://github.com/Donnnno/Arcticons/blob/b3d9bf8b4f0adadb0fb445d54ccbadb0ae490840/app/src/you/res/values-v31/colors.xml#L100C1-L103C82
SVGs get converted to android XMLs with the script too, making the app super lightweight.
You could even do it without background too, but idk how to do that part.
It could be hard to convert everything to XML depending on the SVG but if you wanted to make Material You Icons where only the background changes you could create adaptive Icons
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/icon_background_color" />
<foreground android:drawable="@drawable/icon_fg" />
<monochrome android:drawable="@drawable/icon_fg" />
</adaptive-icon>
The icon_fg can be the already existing icon
and the background color would be something like this
<color name="icon_background_color">@android:color/system_accent1_100</color>
IDK how, but others manage to do it.
Also gonna need some help figuring this out :-)
https://github.com/LawnchairLauncher/lawnicons https://play.google.com/store/apps/details?id=com.akbon.myd https://play.google.com/store/apps/details?id=com.pashapuma.pix.material.you.dark