Merge "Renew the highlight state color" into tm-dev am: 81ee2037ed am: 5fe986be58

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

Change-Id: I3b5e38835df123445bf89e270a36b7dd4a759b1b
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jason Chiu
2022-04-26 06:28:06 +00:00
committed by Automerger Merge Worker
8 changed files with 95 additions and 8 deletions

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?android:attr/textColorPrimaryInverse" />
</selector>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?android:attr/textColorSecondaryInverse" />
</selector>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@android:color/system_accent2_500" android:lStar="80" />
</selector>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?android:attr/textColorPrimary" />
</selector>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?android:attr/textColorSecondary" />
</selector>

View File

@@ -17,7 +17,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<solid <solid
android:color="?android:attr/textColorPrimary" /> android:color="@color/accent_select_background" />
<corners <corners
android:radius="@dimen/homepage_preference_corner_radius" /> android:radius="@dimen/homepage_preference_corner_radius" />
</shape> </shape>

View File

@@ -85,7 +85,6 @@ import android.text.TextUtils;
import android.text.format.DateUtils; import android.text.format.DateUtils;
import android.text.style.TtsSpan; import android.text.style.TtsSpan;
import android.util.ArraySet; import android.util.ArraySet;
import android.util.FeatureFlagUtils;
import android.util.IconDrawableFactory; import android.util.IconDrawableFactory;
import android.util.Log; import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@@ -1220,7 +1219,7 @@ public final class Utils extends com.android.settingslib.Utils {
*/ */
@ColorInt @ColorInt
public static int getHomepageIconColor(Context context) { public static int getHomepageIconColor(Context context) {
return getColorAttrDefaultColor(context, android.R.attr.textColorSecondary); return getColorAttrDefaultColor(context, android.R.attr.textColorPrimary);
} }
/** /**
@@ -1228,6 +1227,6 @@ public final class Utils extends com.android.settingslib.Utils {
*/ */
@ColorInt @ColorInt
public static int getHomepageIconColorHighlight(Context context) { public static int getHomepageIconColorHighlight(Context context) {
return getColorAttrDefaultColor(context, android.R.attr.textColorSecondaryInverse); return context.getColor(R.color.accent_select_primary_text);
} }
} }

View File

@@ -78,12 +78,10 @@ public class HighlightableTopLevelPreferenceAdapter extends PreferenceGroupAdapt
Context context = preferenceGroup.getContext(); Context context = preferenceGroup.getContext();
mTitleColorNormal = Utils.getColorAttrDefaultColor(context, mTitleColorNormal = Utils.getColorAttrDefaultColor(context,
android.R.attr.textColorPrimary); android.R.attr.textColorPrimary);
mTitleColorHighlight = Utils.getColorAttrDefaultColor(context, mTitleColorHighlight = context.getColor(R.color.accent_select_primary_text);
android.R.attr.textColorPrimaryInverse);
mSummaryColorNormal = Utils.getColorAttrDefaultColor(context, mSummaryColorNormal = Utils.getColorAttrDefaultColor(context,
android.R.attr.textColorSecondary); android.R.attr.textColorSecondary);
mSummaryColorHighlight = Utils.getColorAttrDefaultColor(context, mSummaryColorHighlight = context.getColor(R.color.accent_select_secondary_text);
android.R.attr.textColorSecondaryInverse);
mIconColorNormal = Utils.getHomepageIconColor(context); mIconColorNormal = Utils.getHomepageIconColor(context);
mIconColorHighlight = Utils.getHomepageIconColorHighlight(context); mIconColorHighlight = Utils.getHomepageIconColorHighlight(context);
} }