Merge "Fix colors in bubble settings so they're more visible" into udc-dev

This commit is contained in:
Mady Mellor
2023-06-08 17:35:55 +00:00
committed by Android (Google) Code Review
3 changed files with 11 additions and 7 deletions

View File

@@ -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);
}