【发布时间】:2018-05-09 11:14:06
【问题描述】:
如何在 android 中更改通知颜色?我试过这段代码,但它只改变了标题和图标颜色。
NotificationCompat.Builder(mContext,NOTIFICATION_CHANNEL_ID).setColorized(true).setColor(Color.parseColor("#f7da64")
【问题讨论】:
标签: android
如何在 android 中更改通知颜色?我试过这段代码,但它只改变了标题和图标颜色。
NotificationCompat.Builder(mContext,NOTIFICATION_CHANNEL_ID).setColorized(true).setColor(Color.parseColor("#f7da64")
【问题讨论】:
标签: android
确保使用的主题/颜色在
确保在 notificationBuilder.setColor(mNotificationColor) 中,mNotificationColor 确实指向预期的颜色代码。
检查你是否正在设置 meidastyle 如下所示
.setStyle(新媒体风格() .setShowActionsInCompactView( 紧凑视图中的新 int[]{playPauseButtonPosition}) .setMediaSession(mSessionToken))
【讨论】: