AlanScottAgain 1 Posted June 18, 2023 Hi Apps like YouTube have colored notification icons - but even when set my image the notification section to a colored png it still appears white. How can I have my icon show colored? Thanks Alan Share this post Link to post
vfbb 285 Posted June 18, 2023 Did you try Project Options > Icons > Android > Accent Color? Share this post Link to post
vfbb 285 Posted June 18, 2023 Note: notification icons are always monocolor. Share this post Link to post
programmerdelphi2k 237 Posted June 18, 2023 @AlanScottAgain / @vfbb would be this... all icons should be "Opaque White" for all resolutions in Android / Options / Icons / Notifications: all your custom icons in all res = color: Opaque White <-- mandatory change the "Accent Color" for your choice you can create all XML file customized and add it manually in your "Deploy project menu" this files: colors.xml, splash_image_def.xml, strings.xml, styles.xml, styles-v21.xml is build after your "BUILD" command in IDE, then, just do it and copy for another place, do the changes, and add it your "Deploy" menu (before add new custom XML, uncheck old (default) files used by Delphi, of course) --> but this is not necessary at all... if you dont need any customization! NOTE: a "colors.xml" file has this content: (FF0000 = red in my choice) <?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <color name="notification_accent_color">#FF0000</color> </resources> 1 Share this post Link to post
AlanScottAgain 1 Posted June 19, 2023 Thank you for the detailed answers. I think I was confused because the default notification icon is colored! Share this post Link to post
vfbb 285 Posted June 19, 2023 25 minutes ago, AlanScottAgain said: I think I was confused because the default notification icon is colored! Older versions supported multi-color icons (up to Android 6 or 7 if I'm not mistaken). From then on they are treated as mono color. Even if you have your multi-color icon, Android applies a color filter, with the AccentColor color (if the Use Accent Color is selected). When "Use Accent Color" is not selected, your icon will have the default color of the device's theme. Also, in the Android documentation it is stated that the icon should be white, but in practice there is no difference because Android will apply the color filter anyway. Just don't forget to delete your icon's background. 1 1 Share this post Link to post
programmerdelphi2k 237 Posted June 19, 2023 (edited) Google allows you to set an accent color for your push notifications. If you don't set a custom accent color, Android will use a grey accent color. by default only White/Black is used on alphacolor... any other should show a "white square" Edited June 19, 2023 by programmerdelphi2k 1 Share this post Link to post