diff options
author | Tianguang Zhang <tianguang@google.com> | 2021-04-14 00:32:20 +0200 |
---|---|---|
committer | Tianguang Zhang <tianguang@google.com> | 2021-04-19 16:01:06 +0200 |
commit | 12827ffc49bae9828e3642de414deb8e24054495 (patch) | |
tree | ca0e11ea43ebf085b18b8db54b2d68ec28d51dd2 /src/com/android/customization/widget/OptionSelectorController.java | |
parent | 8192e46749ced0304954737bc3c46bc86559e621 (diff) |
Remove hard-coded colors in Wallpaper Picker
The CLs in this topic remove the hard-coded colors from the app, replacing them with ?android:attr/, ?attr/, and sometimes @color/ that is defined using device default colors.
Fixes: 173549815
Test: none added
Change-Id: I4f0d18c1c4afdc5e1651e5b34fef8c7d71cdf8b7
Diffstat (limited to 'src/com/android/customization/widget/OptionSelectorController.java')
-rw-r--r-- | src/com/android/customization/widget/OptionSelectorController.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/com/android/customization/widget/OptionSelectorController.java b/src/com/android/customization/widget/OptionSelectorController.java index 4cbb977e..2df3eea1 100644 --- a/src/com/android/customization/widget/OptionSelectorController.java +++ b/src/com/android/customization/widget/OptionSelectorController.java @@ -29,7 +29,6 @@ import android.view.WindowManager; import android.view.accessibility.AccessibilityEvent; import android.widget.TextView; -import androidx.annotation.ColorInt; import androidx.annotation.Dimension; import androidx.annotation.IntDef; import androidx.annotation.NonNull; @@ -226,14 +225,14 @@ public class OptionSelectorController<T extends CustomizationOption<T>> { mContainer.getContext().getTheme()), Gravity.BOTTOM | Gravity.RIGHT, res.getDimensionPixelSize(R.dimen.check_size), - res.getDimensionPixelOffset(R.dimen.check_offset), 0); + res.getDimensionPixelOffset(R.dimen.check_offset)); } else if (mCheckmarkStyle == CheckmarkStyle.CENTER && option.equals(mAppliedOption)) { drawCheckmark(option, holder, res.getDrawable(R.drawable.check_circle_grey_large, mContainer.getContext().getTheme()), Gravity.CENTER, res.getDimensionPixelSize(R.dimen.center_check_size), - 0, res.getColor(android.R.color.black)); + 0); } else if (option.equals(mAppliedOption)) { // Initialize with "previewed" description if we don't show checkmark holder.setContentDescription(mContainer.getContext(), option, @@ -250,10 +249,7 @@ public class OptionSelectorController<T extends CustomizationOption<T>> { private void drawCheckmark(CustomizationOption<?> option, TileViewHolder holder, Drawable checkmark, int gravity, @Dimension int checkSize, - @Dimension int checkOffset, @ColorInt int checkColor) { - if (checkColor != 0 && checkmark instanceof LayerDrawable) { - ((LayerDrawable) checkmark).getDrawable(1).setTint(checkColor); - } + @Dimension int checkOffset) { Drawable frame = holder.tileView.getForeground(); Drawable[] layers = {frame, checkmark}; if (frame == null) { |