9

how do I change notification color in android? I tried this code but it only changed the title and icon color.

NotificationCompat.Builder(mContext,NOTIFICATION_CHANNEL_ID).setColorized(true).setColor(Color.parseColor("#f7da64")

enter image description here

yigitserin
  • 573
  • 2
  • 6
  • 24

1 Answers1

3
  1. Make sure the Theme/Color used is consistent in

    • application tag of manifest file
    • all style files (style.xml,style.xml(v21))
  2. Make sure in notificationBuilder.setColor(mNotificationColor) , mNotificationColor is really pointing to the expected color code.

  3. Check if you are setting meidastyle as shown below

    .setStyle(new MediaStyle() .setShowActionsInCompactView( new int[]{playPauseButtonPosition})in compact view .setMediaSession(mSessionToken))

Bruce
  • 793
  • 8
  • 17