From 047a13120efbdff83d5bb4d3284349bfbf6d3de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Thu, 28 May 2020 17:50:53 +0200 Subject: [PATCH] Add specific icon for user-triggered notifications. --- .../bridge/blocks/DefaultAndroidBlocks.java | 4 +- .../ic_vector_icon_user_triggered.xml | 7 ++ asset-src/ic_vector_icon_user_triggered.svg | 67 +++++++++++++++++++ 3 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 app/src/main/res/drawable/ic_vector_icon_user_triggered.xml create mode 100644 asset-src/ic_vector_icon_user_triggered.svg diff --git a/app/src/main/java/com/codigoparallevar/minicards/bridge/blocks/DefaultAndroidBlocks.java b/app/src/main/java/com/codigoparallevar/minicards/bridge/blocks/DefaultAndroidBlocks.java index 1fa4c25..1eb9826 100644 --- a/app/src/main/java/com/codigoparallevar/minicards/bridge/blocks/DefaultAndroidBlocks.java +++ b/app/src/main/java/com/codigoparallevar/minicards/bridge/blocks/DefaultAndroidBlocks.java @@ -77,7 +77,7 @@ public class DefaultAndroidBlocks { .Builder(ctx, ProgramakerBridgeService.BridgeUserNotificationChannel) .setContentTitle(title) .setContentText(description) - .setSmallIcon(R.drawable.ic_center_focus_weak_black) // TODO: Change icon + .setSmallIcon(R.drawable.ic_vector_icon_user_triggered) .setPriority(NotificationCompat.PRIORITY_DEFAULT) .build(); @@ -120,7 +120,7 @@ public class DefaultAndroidBlocks { Notification notif = new NotificationCompat .Builder(ctx, ProgramakerBridgeService.BridgeUserVibrationNotificationChannel) .setContentTitle(ctx.getString(R.string.vibration_activated)) - .setSmallIcon(R.drawable.ic_center_focus_weak_black) // TODO: Change icon + .setSmallIcon(R.drawable.ic_vector_icon_user_triggered) .setPriority(NotificationCompat.PRIORITY_DEFAULT) .setAutoCancel(true) .setVibrate(pattern) diff --git a/app/src/main/res/drawable/ic_vector_icon_user_triggered.xml b/app/src/main/res/drawable/ic_vector_icon_user_triggered.xml new file mode 100644 index 0000000..2ab495a --- /dev/null +++ b/app/src/main/res/drawable/ic_vector_icon_user_triggered.xml @@ -0,0 +1,7 @@ + + + diff --git a/asset-src/ic_vector_icon_user_triggered.svg b/asset-src/ic_vector_icon_user_triggered.svg new file mode 100644 index 0000000..c466478 --- /dev/null +++ b/asset-src/ic_vector_icon_user_triggered.svg @@ -0,0 +1,67 @@ + + + + + + image/svg+xml + + + + + + + + + + +