Adding functionality for an additional "disconnected" accent.

This commit is contained in:
lucasgaley 2019-02-15 05:56:47 -07:00
parent 373e38eace
commit c843e6b17a
2 changed files with 3 additions and 2 deletions

View File

@ -98,7 +98,7 @@ public class GB {
.setContentText(text)
.setSmallIcon(connected ? R.drawable.ic_notification : R.drawable.ic_notification_disconnected)
.setContentIntent(getContentIntent(context))
.setColor(context.getResources().getColor(R.color.accent))
.setColor(context.getResources().getColor(connected ? R.color.accent : R.color.accent_disconnected))
.setOngoing(true);
Intent deviceCommunicationServiceIntent = new Intent(context, DeviceCommunicationService.class);
@ -132,7 +132,7 @@ public class GB {
.setContentText(text)
.setSmallIcon(R.drawable.ic_notification_disconnected)
.setContentIntent(getContentIntent(context))
.setColor(context.getResources().getColor(R.color.accent))
.setColor(context.getResources().getColor(R.color.accent_disconnected))
.setOngoing(true);
if (GBApplication.getPrefs().getString("last_device_address", null) != null) {
Intent deviceCommunicationServiceIntent = new Intent(context, DeviceCommunicationService.class);

View File

@ -7,6 +7,7 @@
<color name="primarydark_dark" type="color">#dd2c00</color>
<color name="accent" type="color">#0091ea</color>
<color name="accent_disconnected" type="color">#ea0000</color>
<color name="primarytext_light" type="color">#000000</color>
<color name="primarytext_dark" type="color">#ffffff</color>