From f50661507853227b13f2a1cb45112c7a675f660c Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Sat, 17 Nov 2018 01:04:44 +0000 Subject: [PATCH] Notification icon: hammer and sickle, vector Try to placate newer Androids by changing the icon to match the guidelines from https://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar Since the shield looked odd, anyway, move to a proper hammer and sickle, as obtained from Wikimedia and incorporated under public domain. See https://commons.wikimedia.org/wiki/File:Hammer_and_sickle.svg . See https://github.com/cmukgb/ctfws-timer-android/issues/6 --- mobile/build.gradle | 2 ++ .../ctfwstimer/MainServiceNotification.java | 2 +- mobile/src/main/res/drawable/ic_hammer_and_sickle.xml | 11 +++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 mobile/src/main/res/drawable/ic_hammer_and_sickle.xml diff --git a/mobile/build.gradle b/mobile/build.gradle index 602fbc1..1f8bf51 100644 --- a/mobile/build.gradle +++ b/mobile/build.gradle @@ -9,6 +9,8 @@ android { versionCode 10 versionName "1.2" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + + vectorDrawables.useSupportLibrary = true } buildTypes { release { diff --git a/mobile/src/main/java/com/acmetensortoys/ctfwstimer/MainServiceNotification.java b/mobile/src/main/java/com/acmetensortoys/ctfwstimer/MainServiceNotification.java index 4b2fd38..073303f 100644 --- a/mobile/src/main/java/com/acmetensortoys/ctfwstimer/MainServiceNotification.java +++ b/mobile/src/main/java/com/acmetensortoys/ctfwstimer/MainServiceNotification.java @@ -51,7 +51,7 @@ class MainServiceNotification { userNoteBuilder = new NotificationCompat.Builder(ms, CTFWS_GAME_CHANNEL_ID) .setOnlyAlertOnce(false) - .setSmallIcon(R.drawable.shield1) + .setSmallIcon(R.drawable.ic_hammer_and_sickle) .setContentIntent(PendingIntent.getActivity(ms, 0, ni, 0)); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { diff --git a/mobile/src/main/res/drawable/ic_hammer_and_sickle.xml b/mobile/src/main/res/drawable/ic_hammer_and_sickle.xml new file mode 100644 index 0000000..8aded91 --- /dev/null +++ b/mobile/src/main/res/drawable/ic_hammer_and_sickle.xml @@ -0,0 +1,11 @@ + + + + -- 2.50.1