Currently, I had implemented multi-line notification
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(this.getApplicationContext())
.setContentIntent(contentIntent)
.setSmallIcon(R.drawable.ic_notification)
.setContentTitle(contentTitle)
.setDefaults(Notification.DEFAULT_SOUND)
.setTicker(ticker)
.setContentText(contentText);
// Need BIG view?
if (size > 1) {
NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();
// Sets a title for the Inbox style big view
inboxStyle.setBigContentTitle(contentTitle);
for (String notificationMessage : notificationMessages) {
inboxStyle.addLine(notificationMessage);
}
mBuilder.setStyle(inboxStyle);
}
NotificationManager mNotificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
However, this is not exactly what I want. When I look at GMail implementation, I realize their left hand side text (Yan Cheng Cheok) of every line, is being highlighted.
I was wondering, what is the technique to achieve such effect? As I would like to highlight my stock names.