From: Nathaniel Wesley Filardo Date: Sat, 17 Nov 2018 01:04:44 +0000 (+0000) Subject: Notification icon: hammer and sickle, vector X-Git-Tag: release-1.3~13 X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=f50661507853227b13f2a1cb45112c7a675f660c;p=acmetensortoys-ctfws-android 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 --- 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 @@ + + + +