From e1895caa9daceacedb4688e8e7d4623ff10f9b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Wed, 27 May 2020 18:33:52 +0200 Subject: [PATCH] Add base icon for stopped bridge state. --- .../bridge/ProgramakerBridgeService.java | 7 +- .../res/drawable/ic_vector_stopped_icon.xml | 16 ++++ asset-src/ic_vector_stopped_icon.svg | 80 +++++++++++++++++++ 3 files changed, 100 insertions(+), 3 deletions(-) create mode 100644 app/src/main/res/drawable/ic_vector_stopped_icon.xml create mode 100644 asset-src/ic_vector_stopped_icon.svg diff --git a/app/src/main/java/com/codigoparallevar/minicards/bridge/ProgramakerBridgeService.java b/app/src/main/java/com/codigoparallevar/minicards/bridge/ProgramakerBridgeService.java index 9a884fb..e91887e 100644 --- a/app/src/main/java/com/codigoparallevar/minicards/bridge/ProgramakerBridgeService.java +++ b/app/src/main/java/com/codigoparallevar/minicards/bridge/ProgramakerBridgeService.java @@ -66,15 +66,16 @@ public class ProgramakerBridgeService extends Service { NotificationCompat.Builder builder = new NotificationCompat .Builder(this, ProgramakerBridgeService.BridgeStatusNotificationChannel) .setContentTitle(title) - .setSmallIcon(R.drawable.ic_vector_icon) .setPriority(NotificationCompat.PRIORITY_DEFAULT); if (stopped) { - builder.addAction(R.drawable.ic_start, getString(R.string.start_bridge), startPendingIntent); + builder.addAction(R.drawable.ic_start, getString(R.string.start_bridge), startPendingIntent) + .setSmallIcon(R.drawable.ic_vector_stopped_icon); } else { - builder.addAction(R.drawable.ic_cancel, getString(R.string.stop_bridge), stopPendingIntent); + builder.addAction(R.drawable.ic_cancel, getString(R.string.stop_bridge), stopPendingIntent) + .setSmallIcon(R.drawable.ic_vector_icon); } Notification notification = builder.build(); diff --git a/app/src/main/res/drawable/ic_vector_stopped_icon.xml b/app/src/main/res/drawable/ic_vector_stopped_icon.xml new file mode 100644 index 0000000..130730a --- /dev/null +++ b/app/src/main/res/drawable/ic_vector_stopped_icon.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/asset-src/ic_vector_stopped_icon.svg b/asset-src/ic_vector_stopped_icon.svg new file mode 100644 index 0000000..b5637a2 --- /dev/null +++ b/asset-src/ic_vector_stopped_icon.svg @@ -0,0 +1,80 @@ + + + + + + image/svg+xml + + + + + + + + + + + + +