Open linuslabo opened 1 year ago
Is there a possibility of this being implemented?
This should be simple if we can provide a icon-monochrome.png and it just applies the same resizing logic and outputs the icons as ic_launcher_monochrome.png and adds it to ic_launcher.xml.
I've been looking into this, and trying to implement something, but I'd like to share my initial findings because I'm not quite sure what the best approach could be. I found a few different strategies:
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
works for our app icon. Our foreground icon is a "monochrome" image, in the sense that it's of a single colour, but that colour is not #000000
. I'm not sure what Android did, but it looks like it applies a threshold, and in the end shows it correctly. Converting the logo to full black has the same result. I thought it could be used as a default^1 if the user does not provide a monochrome icon, but probably it would not apply to everyone.android/icon-monochrome
icon to be provided as input^2. However, this does require some rethinking when it comes to the ic_launcher.xml
generation^1, as now the <monochrome />
element should only be created on demand.It'd be great to hear from the Ionic team! Then I'm happy to implement this
there's no way to make it happen now, is there?
It would be great to have support for Android 13+ themed Icons, as promoted here and with more details here
It should be sufficient to add a monochromatic version of the icon and generate the corresponding drawable: