Files
packages_apps_Settings/res/values-night/themes.xml
Salvador Martinez a2e7357535 Change switch text color to black in dark mode
It seems that the attribute values that are used to text color
in the switch bar are selectors which leads to problems because
they include an alpha value when the switch is "off". This would
cause the contrast between the text and the background to be too
low for GAR. This CL simply makes it so that in dark mode the text
for the switch bar is just true black since adjusting the
attributes would have wide scale implications for all UIs using
device default themes.

Test: visual inspection
Bug: 132755745
Change-Id: I309db82e9bf020fb654e0b93f6ec84380ae092f7
2019-05-30 14:16:52 -07:00

44 lines
1.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 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.
-->
<resources>
<style name="Theme.Settings.Home" parent="Theme.Settings.HomeBase">
<item name="colorPrimary">@*android:color/primary_device_default_settings</item>
<item name="colorPrimaryDark">@*android:color/primary_dark_device_default_settings</item>
<item name="android:colorBackground">?android:attr/colorPrimaryDark</item>
</style>
<style name="ThemeOverlay.Settings.SearchBar" parent="Theme.Settings">
<item name="android:colorBackground">?android:attr/colorPrimaryDark</item>
<item name="cardBackgroundColor">?android:attr/colorPrimary</item>
<item name="android:colorControlNormal">?android:attr/colorAccent</item>
</style>
<style name="Theme.SubSettings" parent="Theme.SubSettings.Base"/>
<style name="ThemeOverlay.SwitchBar.Settings" parent="ThemeOverlay.SwitchBar.Settings.Base">
<item name="android:textColorPrimaryInverse">@android:color/black</item>
</style>
<style name="Theme.AlertDialog.Base" parent="@style/Theme.AppCompat.DayNight.Dialog.Alert">
<item name="colorAccent">@*android:color/accent_device_default_dark</item>
<item name="android:colorBackground">@color/dialog_background</item>
</style>
</resources>