简体   繁体   English

如何更改Android Oreo中的通知点颜色

[英]How to change notification dot color in Android Oreo

How to change notification dot color in android Oreo. 如何在android Oreo中更改通知点颜色。

new NotificationCompat.Builder(context)
                .setSmallIcon(R.drawable.ic_notification_white)
                .setColor(ContextCompat.getColor(context, R.color.accent))

I tried with setColor() but it is not working. 我尝试使用setColor()但它无法正常工作。

We cannot change the icon badge color for Android Oreo 我们无法更改Android Oreo的图标徽章颜色

Sadly we cannot change its color as right now, the badge icon color takes the apps icon color and that is the color we see for the badge icon. 遗憾的是,我们现在无法更改其颜色,徽章图标颜色采用应用程序图标颜色,这是我们为徽章图标看到的颜色。

Hopefully, I am wrong or I did not do enough research, but none of the following classes had a method to change the icon badge color: 希望,我错了或者我没有做足够的研究,但是以下类没有一个方法可以更改图标徽章颜色:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM