Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26a4f559 authored by Chuck Liao's avatar Chuck Liao Committed by Automerger Merge Worker
Browse files

Fix grid option does not show selected state am: 59b8db47

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/ThemePicker/+/14732634

Change-Id: I2b8d6bfdc32666ddda10a6bfb0437731630c73f6
parents 26377086 59b8db47
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ public class GridOption implements CustomizationOption<GridOption>, Parcelable {
        Context context = view.getContext();

        int colorFilter = ResourceUtils.getColorAttr(context,
                mIsCurrent ? android.R.attr.textColorPrimary :
                view.isActivated() ? android.R.attr.textColorPrimary :
                android.R.attr.textColorTertiary);
        mTileDrawable.setColorFilter(colorFilter, Mode.SRC_ATOP);
        ((ImageView) view.findViewById(R.id.grid_option_thumbnail))
+5 −0
Original line number Diff line number Diff line
@@ -116,7 +116,12 @@ public class OptionSelectorController<T extends CustomizationOption<T>> {
        }
        updateActivatedStatus(mSelectedOption, false);
        updateActivatedStatus(option, true);
        T lastSelectedOption = mSelectedOption;
        mSelectedOption = option;
        mAdapter.notifyItemChanged(mOptions.indexOf(option));
        if (lastSelectedOption != null) {
            mAdapter.notifyItemChanged(mOptions.indexOf(lastSelectedOption));
        }
        notifyListeners();
    }