From b23136041d4d2494227df66331db12f6dc52eefa Mon Sep 17 00:00:00 2001 From: Julia Tuttle Date: Fri, 9 Jun 2023 13:30:25 -0400 Subject: [PATCH] Fix colors in importance and conversation priority preferences This would have been simpler and faster, but the ChannelPanelActivity was giving me a context where Material colors always inflated in light theme even if the device was in dark theme, so I had to work around it. On the plus side, whoever next needs to change these colors will find them neatly organized in themes.xml! Bug: 284380876 Test: manual Change-Id: I2eee877fe44d307a96d60168d0317444ff002669 --- ...importance_button_background_selected.xml} | 5 +-- ...portance_button_background_unselected.xml} | 5 ++- res/values-night/themes.xml | 10 ++++++ res/values/attrs.xml | 8 +++++ res/values/themes.xml | 22 ++++++++++-- .../notification/app/BubblePreference.java | 8 ++--- .../app/ConversationPriorityPreference.java | 23 ++++++------ .../app/ImportancePreference.java | 36 ++++++++++--------- 8 files changed, 80 insertions(+), 37 deletions(-) rename res/drawable/{button_border_unselected.xml => notification_importance_button_background_selected.xml} (82%) rename res/drawable/{button_border_selected.xml => notification_importance_button_background_unselected.xml} (79%) diff --git a/res/drawable/button_border_unselected.xml b/res/drawable/notification_importance_button_background_selected.xml similarity index 82% rename from res/drawable/button_border_unselected.xml rename to res/drawable/notification_importance_button_background_selected.xml index c97a5ba4827..3c513cdf788 100644 --- a/res/drawable/button_border_unselected.xml +++ b/res/drawable/notification_importance_button_background_selected.xml @@ -15,10 +15,11 @@ limitations under the License. --> + + android:color="?attr/notification_importance_button_border_color_selected"/> diff --git a/res/drawable/button_border_selected.xml b/res/drawable/notification_importance_button_background_unselected.xml similarity index 79% rename from res/drawable/button_border_selected.xml rename to res/drawable/notification_importance_button_background_unselected.xml index 3757517c179..beccfd41574 100644 --- a/res/drawable/button_border_selected.xml +++ b/res/drawable/notification_importance_button_background_unselected.xml @@ -15,12 +15,11 @@ limitations under the License. --> + android:color="?attr/notification_importance_button_background_color_unselected"/> + android:color="?attr/notification_importance_button_border_color_unselected"/> diff --git a/res/values-night/themes.xml b/res/values-night/themes.xml index 946cd91ce0a..c28bfbb94ef 100644 --- a/res/values-night/themes.xml +++ b/res/values-night/themes.xml @@ -34,6 +34,16 @@ @*android:color/surface_dark + + @@ -229,9 +238,18 @@ @*android:string/config_headlineFontFamilyMedium - +