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

Commit 59b8db47 authored by Chuck Liao's avatar Chuck Liao
Browse files

Fix grid option does not show selected state

Video:
https://drive.google.com/file/d/13v6P_Np7ijAhQhYDjMXUWkjs3MWqUMIX/view?usp=sharing&resourcekey=0-sI2jmTp0u1KuTalHNumuzg

Bug: 189060136
Test: manual
Change-Id: I98a5f2dfde187402a7ea83f40f9bff663e5f1cf6
parent 1187d676
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();
    }