Merge "[UI][Modifier key remapping] Use new color token." into udc-dev am: 59461ffd6f am: 5e53a4aa56

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

Change-Id: I1c4c0a0805b9f74fdb57de4f242dc7722dd67d3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-04-25 16:36:48 +00:00
committed by Automerger Merge Worker
8 changed files with 15 additions and 15 deletions

View File

@@ -139,7 +139,7 @@ public class ModifierKeysPickerDialogFragment extends DialogFragment {
} else {
itemSummary = new SpannableString(selectedItem);
itemSummary.setSpan(
new ForegroundColorSpan(getColorOfColorAccentPrimaryVariant()),
new ForegroundColorSpan(getColorOfMaterialColorPrimary()),
0, itemSummary.length(), 0);
int[] fromKeys = mRemappableKeyMap.get(mKeyDefaultName);
int[] toKeys = mRemappableKeyMap.get(selectedItem);
@@ -222,7 +222,7 @@ public class ModifierKeysPickerDialogFragment extends DialogFragment {
textView.setText(mList.get(i));
if (mCurrentItem == i) {
mKeyFocus = mList.get(i);
textView.setTextColor(getColorOfColorAccentPrimaryVariant());
textView.setTextColor(getColorOfMaterialColorPrimary());
checkIcon.setImageAlpha(255);
view.setBackground(
mActivity.getDrawable(R.drawable.modifier_key_lisetview_background));
@@ -251,8 +251,8 @@ public class ModifierKeysPickerDialogFragment extends DialogFragment {
return Utils.getColorAttrDefaultColor(mActivity, android.R.attr.textColorSecondary);
}
private int getColorOfColorAccentPrimaryVariant() {
private int getColorOfMaterialColorPrimary() {
return Utils.getColorAttrDefaultColor(
mActivity, com.android.internal.R.attr.materialColorPrimaryContainer);
mActivity, com.android.internal.R.attr.materialColorPrimary);
}
}

View File

@@ -150,14 +150,14 @@ public class ModifierKeysPreferenceController extends BasePreferenceController {
private Spannable changeSummaryColor(String summary) {
Spannable spannableSummary = new SpannableString(summary);
spannableSummary.setSpan(
new ForegroundColorSpan(getColorOfColorAccentPrimaryVariant()),
new ForegroundColorSpan(getColorOfMaterialColorPrimary()),
0, spannableSummary.length(), 0);
return spannableSummary;
}
private int getColorOfColorAccentPrimaryVariant() {
private int getColorOfMaterialColorPrimary() {
return Utils.getColorAttrDefaultColor(
mContext, com.android.internal.R.attr.materialColorPrimaryContainer);
mContext, com.android.internal.R.attr.materialColorPrimary);
}
private static boolean isCtrl(int keyCode) {

View File

@@ -82,13 +82,13 @@ public class ModifierKeysRestorePreferenceController extends BasePreferenceContr
Spannable title = new SpannableString(
mParent.getActivity().getString(R.string.modifier_keys_reset_title));
title.setSpan(
new ForegroundColorSpan(getColorOfColorAccentPrimaryVariant()),
new ForegroundColorSpan(getColorOfMaterialColorPrimary()),
0, title.length(), 0);
preference.setTitle(title);
}
private int getColorOfColorAccentPrimaryVariant() {
private int getColorOfMaterialColorPrimary() {
return Utils.getColorAttrDefaultColor(
mParent.getActivity(), com.android.internal.R.attr.materialColorPrimaryContainer);
mParent.getActivity(), com.android.internal.R.attr.materialColorPrimary);
}
}