为通知中的应用程序名称文本设置颜色(Android)

问题描述:

我想为通知上显示的应用程序名称文本设置颜色。如何将颜色从灰色变为绿色或蓝色?为通知中的应用程序名称文本设置颜色(Android)

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

+0

尝试使用customView通知 –

通过

查找的TextView其并使用SetTextColor方法来设置颜色。恩。如下所示。

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);