Open superwilly1 opened 4 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Description
Android supports 3 layers in the app icon: background, foreground and monochrome. At the moment MAUI only supports background and foreground, and the monochrome is always set to the foreground resource. https://github.com/dotnet/maui/blob/f2cc45e3e95370fb170464b6af141e1cb88172c2/src/SingleProject/Resizetizer/src/AndroidAdaptiveIconGenerator.cs#L31
As the foreground resource of our app icons contain different colors instead of being a monochrome image, the app icon is showing incorrect on Android 13+ devices where the user has turned on 'themed icons' in the Android settings.
Android suggests setting 3 different layers: https://developer.android.com/develop/ui/views/launch/icon_design_adaptive#add-to-your-app
Public API Changes
Current configuration in our apps:
Suggested change: only implement the monochrome layer if a MonochromeFile is supplied. So if no MonochromeFile is supplied, don't add a monochrome layer (that way our icons will display correct because themed icons is not used in this case):
or to keep it backwards compatible, add an extra property to opt out of using the monochrome layer:
Intended Use-Case
To correctly implement the monochrome layer (and themed icons) on Android, we would like to have the possibility to either turn off the monochrome layer or to specify a resource to use for the monochrome layer (instead of using the foreground resource).
This way we can make sure the app icon is shown as we want it to, also when the user activates 'themed icons' on Android.