setColor small icon notification android

时光总嘲笑我的痴心妄想 提交于 2021-02-19 07:58:12

问题


I change the top color of the icon and the app name by using setColor method of the NotificationCompat.Builder, The problem is that the displayed color doesn't match the provided one as it gets darker in the notification. my color is #21bbe6 I did find out Android N notification title and icon color is darker, but I still don't understand why, and how to deal with it. https://imgur.com/a/6nx4EsA


回答1:


Google decided to restrict acceptable colors in Notification when using setColor. It's undocumented!



来源:https://stackoverflow.com/questions/54071779/setcolor-small-icon-notification-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!