From f1846788029c6167a98b33e703e996b7675e28f0 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Wed, 7 Jun 2023 17:19:21 -0700 Subject: [PATCH] Fix colors in bubble settings so they're more visible Test: manual - get a bubble, go to that apps bubble settings screen, observe the colors look correct, switch theme and check again. Bug: 283951560 Change-Id: I361b1c20e293c02b4d604e0b5845a074c31e5103 --- res/drawable/button_border_selected.xml | 7 +++++-- res/drawable/button_border_unselected.xml | 4 ++-- .../settings/notification/app/BubblePreference.java | 7 ++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/res/drawable/button_border_selected.xml b/res/drawable/button_border_selected.xml index 1402380d0ed..113ae0cf49d 100644 --- a/res/drawable/button_border_selected.xml +++ b/res/drawable/button_border_selected.xml @@ -15,9 +15,12 @@ limitations under the License. --> + + android:width="1dp" + android:color="?androidprv:attr/materialColorOnPrimaryContainer"/> diff --git a/res/drawable/button_border_unselected.xml b/res/drawable/button_border_unselected.xml index d0ce75b8c86..c97a5ba4827 100644 --- a/res/drawable/button_border_unselected.xml +++ b/res/drawable/button_border_unselected.xml @@ -15,10 +15,10 @@ limitations under the License. --> - + android:color="?androidprv:attr/materialColorOutlineVariant"/> diff --git a/src/com/android/settings/notification/app/BubblePreference.java b/src/com/android/settings/notification/app/BubblePreference.java index 9de7e0c9b12..346cca37275 100644 --- a/src/com/android/settings/notification/app/BubblePreference.java +++ b/src/com/android/settings/notification/app/BubblePreference.java @@ -167,9 +167,10 @@ public class BubblePreference extends Preference implements View.OnClickListener : R.drawable.button_border_unselected)); mView.setSelected(selected); - ColorStateList stateList = selected - ? Utils.getColorAccent(context) - : Utils.getColorAttr(context, android.R.attr.textColorPrimary); + int colorResId = selected + ? com.android.internal.R.attr.materialColorOnPrimaryContainer + : com.android.internal.R.attr.materialColorOnSurfaceVariant; + ColorStateList stateList = Utils.getColorAttr(context, colorResId); mImageView.setImageTintList(stateList); mTextView.setTextColor(stateList); }