Merge "[UI][Modifier key remapping] Use new color token." into udc-dev
diff --git a/res/drawable/ic_modifier_keys_reset.xml b/res/drawable/ic_modifier_keys_reset.xml
index 7758be8..5345c25 100644
--- a/res/drawable/ic_modifier_keys_reset.xml
+++ b/res/drawable/ic_modifier_keys_reset.xml
@@ -21,7 +21,7 @@
android:height="24.0dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
- android:tint="?androidprv:attr/materialColorPrimaryContainer">
+ android:tint="?androidprv:attr/materialColorPrimary">
<path
android:fillColor="@android:color/white"
android:pathData="M18,4C13.58,0.69 7.31,1.58 4,6V4H2v6h6V8H5.09c1.44,-2.47 4.09,-3.98 6.94,-3.97c4.42,0.02 7.99,3.61 7.97,8.03s-3.61,7.99 -8.03,7.97C7.55,20.01 3.98,16.42 4,12H2c0,3.15 1.48,6.11 4,8c4.42,3.31 10.69,2.42 14,-2C23.31,13.58 22.42,7.31 18,4z"/>
diff --git a/res/drawable/modifier_key_bordered.xml b/res/drawable/modifier_key_bordered.xml
index 976a3eb..29316796 100644
--- a/res/drawable/modifier_key_bordered.xml
+++ b/res/drawable/modifier_key_bordered.xml
@@ -25,7 +25,7 @@
<solid android:color="@android:color/transparent"/>
<stroke
android:width="1dp"
- android:color="?androidprv:attr/materialColorPrimaryContainer"/>
+ android:color="?androidprv:attr/materialColorPrimary"/>
</shape>
</item>
</ripple>
diff --git a/res/drawable/modifier_key_colored.xml b/res/drawable/modifier_key_colored.xml
index 2bb033b..995d733 100644
--- a/res/drawable/modifier_key_colored.xml
+++ b/res/drawable/modifier_key_colored.xml
@@ -22,7 +22,7 @@
<item>
<shape android:shape="rectangle">
<corners android:radius="24dp"/>
- <solid android:color="?androidprv:attr/colorAccentPrimary"/>
+ <solid android:color="?androidprv:attr/materialColorPrimary"/>
</shape>
</item>
</ripple>
diff --git a/res/drawable/modifier_key_lisetview_background.xml b/res/drawable/modifier_key_lisetview_background.xml
index 4e12b62..3353cfd 100644
--- a/res/drawable/modifier_key_lisetview_background.xml
+++ b/res/drawable/modifier_key_lisetview_background.xml
@@ -22,7 +22,7 @@
<item>
<shape android:shape="rectangle">
<corners android:radius="24dp"/>
- <solid android:color="?androidprv:attr/materialColorSurfaceContainerHigh"/>
+ <solid android:color="?androidprv:attr/materialColorSurfaceContainerHighest"/>
</shape>
</item>
</ripple>
diff --git a/res/layout/modifier_key_item.xml b/res/layout/modifier_key_item.xml
index 51ba027..a189479 100644
--- a/res/layout/modifier_key_item.xml
+++ b/res/layout/modifier_key_item.xml
@@ -32,7 +32,7 @@
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:src="@drawable/ic_check_24dp"
- android:tint="?androidprv:attr/materialColorPrimaryContainer"/>
+ android:tint="?androidprv:attr/materialColorPrimary"/>
<TextView
android:id="@+id/modifier_key_text"
diff --git a/src/com/android/settings/inputmethod/ModifierKeysPickerDialogFragment.java b/src/com/android/settings/inputmethod/ModifierKeysPickerDialogFragment.java
index 14578af..949e656 100644
--- a/src/com/android/settings/inputmethod/ModifierKeysPickerDialogFragment.java
+++ b/src/com/android/settings/inputmethod/ModifierKeysPickerDialogFragment.java
@@ -139,7 +139,7 @@
} 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 @@
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 @@
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);
}
}
diff --git a/src/com/android/settings/inputmethod/ModifierKeysPreferenceController.java b/src/com/android/settings/inputmethod/ModifierKeysPreferenceController.java
index 91caf29..5d8149a 100644
--- a/src/com/android/settings/inputmethod/ModifierKeysPreferenceController.java
+++ b/src/com/android/settings/inputmethod/ModifierKeysPreferenceController.java
@@ -150,14 +150,14 @@
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) {
diff --git a/src/com/android/settings/inputmethod/ModifierKeysRestorePreferenceController.java b/src/com/android/settings/inputmethod/ModifierKeysRestorePreferenceController.java
index 3171487..4bb1069 100644
--- a/src/com/android/settings/inputmethod/ModifierKeysRestorePreferenceController.java
+++ b/src/com/android/settings/inputmethod/ModifierKeysRestorePreferenceController.java
@@ -82,13 +82,13 @@
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);
}
}