Merge "Update Switch color to improve accessibility" into sc-dev am: 4e395b9821

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15127246

Change-Id: I70e24cdd5464cc9a3ae1567840e0ac74b98d6f46
This commit is contained in:
Edgar Wang
2021-06-29 20:15:44 +00:00
committed by Automerger Merge Worker
5 changed files with 50 additions and 5 deletions

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 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="51" />
</selector>

View File

@@ -17,7 +17,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Disabled status of thumb -->
<item android:state_enabled="false"
android:color="@color/settingslib_thumb_off_color" />
android:color="@color/settingslib_thumb_disabled_color" />
<!-- Toggle off status of thumb -->
<item android:state_checked="false"
android:color="@color/settingslib_thumb_off_color" />

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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_neutral2_500" android:lStar="45" />
</selector>

View File

@@ -16,11 +16,14 @@
-->
<resources>
<!-- Material next thumb disable color-->
<color name="settingslib_thumb_disabled_color">@android:color/system_neutral1_700</color>
<!-- Material next thumb off color-->
<color name="settingslib_thumb_off_color">@android:color/system_neutral2_300</color>
<color name="settingslib_thumb_off_color">@android:color/system_neutral1_400</color>
<!-- Material next track on color-->
<color name="settingslib_track_on_color">@android:color/system_accent2_700</color>
<color name="settingslib_track_on_color">@color/settingslib_switch_track_on</color>
<!-- Material next track off color-->
<color name="settingslib_track_off_color">@android:color/system_neutral1_700</color>

View File

@@ -22,14 +22,17 @@
<!-- Material next state off color-->
<color name="settingslib_state_off_color">@android:color/system_accent2_100</color>
<!-- Material next thumb disable color-->
<color name="settingslib_thumb_disabled_color">@android:color/system_neutral2_100</color>
<!-- Material next thumb off color-->
<color name="settingslib_thumb_off_color">@android:color/system_neutral2_100</color>
<color name="settingslib_thumb_off_color">@android:color/system_neutral2_300</color>
<!-- Material next track on color-->
<color name="settingslib_track_on_color">@android:color/system_accent1_600</color>
<!-- Material next track off color-->
<color name="settingslib_track_off_color">@android:color/system_neutral2_600</color>
<color name="settingslib_track_off_color">@color/settingslib_switch_track_off</color>
<!-- Dialog accent color -->
<color name="settingslib_dialog_accent">@android:color/system_accent1_600</color>