Android NotificationBuilder上的小图标和标题颜色错误
这个问题与 但我们还没有找到任何解决办法 当为小图标和标题设置颜色时,Android似乎不尊重我们选择的颜色。 在网页和源代码上搜索,似乎Android在展示前会操纵颜色,以获得背景和图标之间的正确对比度 但是像whatsapp、Linkedin和Twitter这样的其他应用程序如何使用正确的颜色呢?请注意,图标和文本都是错误的,因此与图像格式无关 我的代码Android NotificationBuilder上的小图标和标题颜色错误,android,Android,这个问题与 但我们还没有找到任何解决办法 当为小图标和标题设置颜色时,Android似乎不尊重我们选择的颜色。 在网页和源代码上搜索,似乎Android在展示前会操纵颜色,以获得背景和图标之间的正确对比度 但是像whatsapp、Linkedin和Twitter这样的其他应用程序如何使用正确的颜色呢?请注意,图标和文本都是错误的,因此与图像格式无关 我的代码 //accent should show a lighter version of blue and not that one
//accent should show a lighter version of blue and not that one
//drawable is hiden, but the original was generated with android studio
val notificationBuilder = NotificationCompat.Builder(this, channelID)
.setSmallIcon(R.drawable.test)
.setColor(ContextCompat.getColor(this, R.color.accent))
.setContentTitle("fake title 01")
.setContentText("fake body 01")
.setPriority(NotificationCompat.PRIORITY_HIGH)