通知小图标颜色不是我设置的颜色
notification small icon color not the color I set
我正在建立一个通知,setSmallIcon(图标是使用白色图像)和setColor,但是我发现phone上的颜色不是我设置的颜色,[=21=上的颜色] 是不变的,如果将红色变为黄色是可以的,但是改变一种颜色的颜色值 eg:lightblue 深蓝色是不变的。如果我将颜色设置为红色,phone 上的颜色比我设置的颜色更暗。
我不知道如何在虚拟 phone 和 sumsung 中造成这种情况。
需要你的帮助。谢谢
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this, channelId)
.setSmallIcon(R.drawable.ic_app_notification)
.setColor(ContextCompat.getColor(this, R.color.notification_icon_color)).setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_app_login))
.setContentTitle(title)
.setContentText(messageBody)
.setAutoCancel(true)
.setSound(defaultSoundUri)
.setContentIntent(pendingIntent);
清单中也设置了颜色
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/notification_icon_color"
我设置颜色#63B9C7
但在 phone 上不是 #63B9C7
我正在建立一个通知,setSmallIcon(图标是使用白色图像)和setColor,但是我发现phone上的颜色不是我设置的颜色,[=21=上的颜色] 是不变的,如果将红色变为黄色是可以的,但是改变一种颜色的颜色值 eg:lightblue 深蓝色是不变的。如果我将颜色设置为红色,phone 上的颜色比我设置的颜色更暗。 我不知道如何在虚拟 phone 和 sumsung 中造成这种情况。
需要你的帮助。谢谢
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this, channelId)
.setSmallIcon(R.drawable.ic_app_notification)
.setColor(ContextCompat.getColor(this, R.color.notification_icon_color)).setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_app_login))
.setContentTitle(title)
.setContentText(messageBody)
.setAutoCancel(true)
.setSound(defaultSoundUri)
.setContentIntent(pendingIntent);
清单中也设置了颜色
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/notification_icon_color"
我设置颜色#63B9C7 但在 phone 上不是 #63B9C7