6

I am trying to set color for app name text that appears on top of notification. How to change the color to green or blue from grey?

I am looking for something like below, for whatsapp it is green but for my app it is grey

James Z
  • 12,209
  • 10
  • 24
  • 44
Ovais Khan
  • 205
  • 2
  • 16

2 Answers2

7

Just set the color of your notification (as described in https://stackoverflow.com/a/45874836/364388):

NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
...
builder.setColor(ContextCompat.getColor(context, R.color.my_notif_color));    
manager.notify(notificationId, builder.build())
Rodja
  • 7,998
  • 8
  • 48
  • 55
-1

Find TextView by its it and use SetTextColor method to set the color. ex. as following.

var builder = new AlertDialog.Builder (this);
var dialog = builder.Show();
int textColorId = Resources.GetIdentifier ("alertTitle", "id", "android");
TextView textColor = dialog.FindViewById<TextView> (textColorId);
textColor?.SetTextColor (Color.DarkRed);
Sunny
  • 1,504
  • 14
  • 22