diff options
author | Michael W <baddaemon87@gmail.com> | 2020-06-06 16:21:33 +0200 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2020-12-08 19:39:12 +0200 |
commit | aa0db9f6a7b1607c7e5e06a3d79798e29bc7f33c (patch) | |
tree | a100e97b53e83631c2e161ccf17bb44bca635b7a | |
parent | a62d5e84076f8bc0dadf7ddce781c31e8709eef1 (diff) |
DeskClock: Come to the dark side...
... we have cookies
* Move minSdkVersion to 24 so the notification actions don't use the
icons anymore and we can just tint the icons black to fit onto the new
accent color used e.g. for the FABs
* Move accent color to an own color name which is defined differently
for values and values-night
* Background: Keep blue for light theme but use grey for night one
Change-Id: Ib14044fc9c6de15453891638581a7e3f4d10c6c5
-rw-r--r-- | AndroidManifest.xml | 2 | ||||
-rw-r--r-- | res/drawable-hdpi/ic_add_white_24dp.png | bin | 127 -> 0 bytes | |||
-rw-r--r-- | res/drawable-mdpi/ic_add_white_24dp.png | bin | 88 -> 0 bytes | |||
-rw-r--r-- | res/drawable/ic_add_24dp.xml | 11 | ||||
-rw-r--r-- | res/drawable/ic_add_white_24dp.xml (renamed from res/drawable-v21/ic_add_24dp.xml) | 12 | ||||
-rw-r--r-- | res/drawable/ic_pause_24dp.xml | 2 | ||||
-rw-r--r-- | res/drawable/ic_public.xml | 4 | ||||
-rw-r--r-- | res/drawable/ic_start_24dp.xml | 2 | ||||
-rw-r--r-- | res/drawable/ic_stop_24dp.xml | 2 | ||||
-rw-r--r-- | res/values-night/colors.xml | 21 | ||||
-rw-r--r-- | res/values/colors.xml | 2 | ||||
-rw-r--r-- | res/values/themes.xml | 2 | ||||
-rw-r--r-- | src/com/android/deskclock/AlarmClockFragment.java | 2 | ||||
-rw-r--r-- | src/com/android/deskclock/ringtone/AddCustomRingtoneViewHolder.java | 2 |
14 files changed, 50 insertions, 14 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index e658a401b..27da155e7 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -22,7 +22,7 @@ <original-package android:name="com.android.alarmclock" /> <original-package android:name="com.android.deskclock" /> - <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29" /> + <uses-sdk android:minSdkVersion="24" android:targetSdkVersion="29" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> diff --git a/res/drawable-hdpi/ic_add_white_24dp.png b/res/drawable-hdpi/ic_add_white_24dp.png Binary files differdeleted file mode 100644 index 694179bd4..000000000 --- a/res/drawable-hdpi/ic_add_white_24dp.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_add_white_24dp.png b/res/drawable-mdpi/ic_add_white_24dp.png Binary files differdeleted file mode 100644 index 3856041d7..000000000 --- a/res/drawable-mdpi/ic_add_white_24dp.png +++ /dev/null diff --git a/res/drawable/ic_add_24dp.xml b/res/drawable/ic_add_24dp.xml index 5a91ced2f..bfbe7314f 100644 --- a/res/drawable/ic_add_24dp.xml +++ b/res/drawable/ic_add_24dp.xml @@ -14,5 +14,12 @@ limitations under the License. --> -<bitmap xmlns:android="http://schemas.android.com/apk/res/android" - android:src="@drawable/ic_add_white_24dp" /> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:width="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/black" + android:pathData="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" /> +</vector> diff --git a/res/drawable-v21/ic_add_24dp.xml b/res/drawable/ic_add_white_24dp.xml index 61ef28501..71ed3d7f5 100644 --- a/res/drawable-v21/ic_add_24dp.xml +++ b/res/drawable/ic_add_white_24dp.xml @@ -14,6 +14,12 @@ limitations under the License. --> -<bitmap xmlns:android="http://schemas.android.com/apk/res/android" - android:src="@drawable/ic_add_white_24dp" - android:tint="@color/black_54p" /> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:width="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" /> +</vector> diff --git a/res/drawable/ic_pause_24dp.xml b/res/drawable/ic_pause_24dp.xml index 5a87b7c85..15bbcddab 100644 --- a/res/drawable/ic_pause_24dp.xml +++ b/res/drawable/ic_pause_24dp.xml @@ -4,6 +4,6 @@ android:viewportHeight="24.0" android:viewportWidth="24.0"> <path - android:fillColor="@android:color/white" + android:fillColor="@android:color/black" android:pathData="M19,19h-6L13,5h6v14zM15,17h2L17,7h-2v10zM11,19L5,19L5,5h6v14zM7,17h2L9,7L7,7v10z" /> </vector> diff --git a/res/drawable/ic_public.xml b/res/drawable/ic_public.xml index 8e3853738..330c831cf 100644 --- a/res/drawable/ic_public.xml +++ b/res/drawable/ic_public.xml @@ -20,6 +20,6 @@ android:viewportWidth="24.0" android:viewportHeight="24.0"> <path - android:fillColor="@android:color/white" + android:fillColor="@android:color/black" android:pathData="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z" /> -</vector>
\ No newline at end of file +</vector> diff --git a/res/drawable/ic_start_24dp.xml b/res/drawable/ic_start_24dp.xml index 064edd878..96e0449b2 100644 --- a/res/drawable/ic_start_24dp.xml +++ b/res/drawable/ic_start_24dp.xml @@ -4,6 +4,6 @@ android:viewportHeight="24.0" android:viewportWidth="24.0"> <path - android:fillColor="@android:color/white" + android:fillColor="@android:color/black" android:pathData="M8.5,8.64L13.77,12L8.5,15.36V8.64M6.5,5V19L17.5,12" /> </vector> diff --git a/res/drawable/ic_stop_24dp.xml b/res/drawable/ic_stop_24dp.xml index b5e814402..4d9c9d41e 100644 --- a/res/drawable/ic_stop_24dp.xml +++ b/res/drawable/ic_stop_24dp.xml @@ -4,6 +4,6 @@ android:viewportHeight="24.0" android:viewportWidth="24.0"> <path - android:fillColor="@android:color/white" + android:fillColor="@android:color/black" android:pathData="M16,8v8H8V8h8m2-2H6v12h12V6z" /> </vector> diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml new file mode 100644 index 000000000..a555c4981 --- /dev/null +++ b/res/values-night/colors.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2016 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + +<resources> + <color name="default_background">#121212</color> + <color name="accent_color">#FEF177</color> +</resources> diff --git a/res/values/colors.xml b/res/values/colors.xml index 2f1fc87a3..a6a127480 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -36,4 +36,6 @@ <!-- shadowColor for widget text --> <color name="widget_shadow_color">#000000</color> + + <color name="accent_color">#FFEB40</color> </resources> diff --git a/res/values/themes.xml b/res/values/themes.xml index c1681eeb3..63216f441 100644 --- a/res/values/themes.xml +++ b/res/values/themes.xml @@ -28,7 +28,7 @@ <item name="android:windowContentOverlay">@null</item> <!-- Attributes from androidx.appcompat.appcompat --> - <item name="colorAccent">#DA4336</item> + <item name="colorAccent">@color/accent_color</item> <item name="colorBackgroundFloating">#303030</item> <item name="colorControlActivated">@android:color/white</item> <item name="colorControlNormal">?android:attr/textColorPrimary</item> diff --git a/src/com/android/deskclock/AlarmClockFragment.java b/src/com/android/deskclock/AlarmClockFragment.java index 8198b58ba..ac1966a0d 100644 --- a/src/com/android/deskclock/AlarmClockFragment.java +++ b/src/com/android/deskclock/AlarmClockFragment.java @@ -392,7 +392,7 @@ public final class AlarmClockFragment extends DeskClockFragment implements @Override public void onUpdateFab(@NonNull ImageView fab) { fab.setVisibility(View.VISIBLE); - fab.setImageResource(R.drawable.ic_add_white_24dp); + fab.setImageResource(R.drawable.ic_add_24dp); fab.setContentDescription(fab.getResources().getString(R.string.button_alarms)); } diff --git a/src/com/android/deskclock/ringtone/AddCustomRingtoneViewHolder.java b/src/com/android/deskclock/ringtone/AddCustomRingtoneViewHolder.java index 5cc6fad4a..906ec6043 100644 --- a/src/com/android/deskclock/ringtone/AddCustomRingtoneViewHolder.java +++ b/src/com/android/deskclock/ringtone/AddCustomRingtoneViewHolder.java @@ -45,7 +45,7 @@ final class AddCustomRingtoneViewHolder extends ItemViewHolder<AddCustomRingtone nameView.setAlpha(0.63f); final ImageView imageView = (ImageView) itemView.findViewById(R.id.ringtone_image); - imageView.setImageResource(R.drawable.ic_add_white_24dp); + imageView.setImageResource(R.drawable.ic_add_24dp); imageView.setAlpha(0.63f); } |