Add color to notification
This commit is contained in:
parent
d2190fd998
commit
ee541ac036
1 changed files with 12 additions and 0 deletions
|
@ -89,6 +89,8 @@ public class ApiTwentySixPlus {
|
||||||
.setNumber(msgCount)
|
.setNumber(msgCount)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
.setShowWhen(true)
|
.setShowWhen(true)
|
||||||
|
.setColorized(true)
|
||||||
|
.setColor(context.getColor(R.color.notification_color_led))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return notif;
|
return notif;
|
||||||
|
@ -110,6 +112,8 @@ public class ApiTwentySixPlus {
|
||||||
.setPriority(Notification.PRIORITY_HIGH)
|
.setPriority(Notification.PRIORITY_HIGH)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
.setShowWhen(true)
|
.setShowWhen(true)
|
||||||
|
.setColorized(true)
|
||||||
|
.setColor(context.getColor(R.color.notification_color_led))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return notif;
|
return notif;
|
||||||
|
@ -130,6 +134,8 @@ public class ApiTwentySixPlus {
|
||||||
.setPriority(priority)
|
.setPriority(priority)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
.setShowWhen(true)
|
.setShowWhen(true)
|
||||||
|
.setColorized(true)
|
||||||
|
.setColor(context.getColor(R.color.notification_color_led))
|
||||||
.build();
|
.build();
|
||||||
} else {
|
} else {
|
||||||
notif = new Notification.Builder(context, context.getString(R.string.notification_service_channel_id))
|
notif = new Notification.Builder(context, context.getString(R.string.notification_service_channel_id))
|
||||||
|
@ -142,6 +148,8 @@ public class ApiTwentySixPlus {
|
||||||
.setPriority(priority)
|
.setPriority(priority)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
.setShowWhen(true)
|
.setShowWhen(true)
|
||||||
|
.setColorized(true)
|
||||||
|
.setColor(context.getColor(R.color.notification_color_led))
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,6 +174,8 @@ public class ApiTwentySixPlus {
|
||||||
.setPriority(Notification.PRIORITY_HIGH)
|
.setPriority(Notification.PRIORITY_HIGH)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
.setShowWhen(true)
|
.setShowWhen(true)
|
||||||
|
.setColorized(true)
|
||||||
|
.setColor(context.getColor(R.color.notification_color_led))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return notif;
|
return notif;
|
||||||
|
@ -185,6 +195,8 @@ public class ApiTwentySixPlus {
|
||||||
.setPriority(Notification.PRIORITY_HIGH)
|
.setPriority(Notification.PRIORITY_HIGH)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
.setShowWhen(true)
|
.setShowWhen(true)
|
||||||
|
.setColorized(true)
|
||||||
|
.setColor(context.getColor(R.color.notification_color_led))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return notif;
|
return notif;
|
||||||
|
|
Loading…
Reference in a new issue