Question:
How can I make a coloured application name in the push notification on Android as shown in the screenshot below?
Answer:
1. First of all, you should create your own Custom Notification Factory. You can find the sample of Notification Factory by following the link below:
2. Next, create the custom layout. You can use this one from our application as an example.
In the TextView section add android:textColor attribute and specify the necessary colour value, in the form of "#rgb
", "#argb
", "#rrggbb
", or "#aarrggbb
".
3. Finally, apply a custom layout you have created to the Custom Notification Factory using setCustomContentView method.
Comments
0 comments
Please sign in to leave a comment.