the Settings screen now follows the Dynamic Color theme on Android 12 and higher
This commit is contained in:
parent
28801ba95b
commit
ada5261773
19 changed files with 286 additions and 63 deletions
41
app/src/main/res/values-night-v31/styles.xml
Normal file
41
app/src/main/res/values-night-v31/styles.xml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="TTheme" parent="Theme.Material3.DynamicColors.Dark">
|
||||
<item name="preferenceTheme">@style/PreferenceOverlay</item>
|
||||
|
||||
<!-- title bar -->
|
||||
<item name="tint">@color/material_dynamic_neutral90</item> <!-- back button color -->
|
||||
<item name="colorOnSurface">@color/material_dynamic_neutral90</item> <!-- title text color -->
|
||||
<item name="colorSurfaceContainer">@color/material_dynamic_neutral_variant30</item> <!-- title background -->
|
||||
|
||||
<!-- page -->
|
||||
<item name="android:windowBackground">@color/material_dynamic_neutral10</item> <!-- page background -->
|
||||
<item name="colorSecondary">@color/material_dynamic_primary70</item> <!-- category title -->
|
||||
<item name="android:textAppearanceListItem">@style/TextAppearance.Material3.TitleLarge</item> <!-- preference title -->
|
||||
<!-- <item name="android:popupMenuStyle">@style/AppDropDownStyle</item> <!– dropdown background –>-->
|
||||
</style>
|
||||
|
||||
<style name="PreferenceOverlay" parent="@style/PreferenceThemeOverlay">
|
||||
<item name="switchPreferenceCompatStyle">@style/AppSwitchStyle</item>
|
||||
</style>
|
||||
|
||||
<!-- <style name="AppDropDownStyle" parent="Widget.AppCompat.ListPopupWindow">-->
|
||||
<!-- <item name="android:background">@color/material_dynamic_neutral_variant30</item>-->
|
||||
<!-- <item name="popupMenuBackground">@color/material_dynamic_neutral_variant30</item>-->
|
||||
<!-- </style>-->
|
||||
|
||||
<style name="AppSwitchStyle" parent="@style/Preference.SwitchPreferenceCompat.Material">
|
||||
<item name="widgetLayout">@layout/pref_switch_v31</item>
|
||||
</style>
|
||||
|
||||
<style name="TTheme.AddWord" parent="Theme.Material3.Dark.Dialog.Alert">
|
||||
<item name="windowNoTitle">true</item> <!-- hide some weird floating rectangle above the dialog -->
|
||||
<item name="android:textColor">@color/material_dynamic_neutral99</item> <!-- headline (title) text color -->
|
||||
<item name="android:textColorPrimary">@color/material_dynamic_neutral_variant95</item> <!-- supporting text (body text) color -->
|
||||
<item name="android:background">@color/material_dynamic_neutral20</item> <!-- container background -->
|
||||
<item name="colorPrimary">@color/material_dynamic_primary90</item> <!-- label text (button text) color -->
|
||||
|
||||
<item name="textAppearanceBodyMedium">@style/TextAppearance.AppCompat.Widget.PopupMenu.Large</item> <!-- body text size -->
|
||||
<item name="textAppearanceLabelLarge">@style/TextAppearance.MaterialComponents.Button</item> <!-- button text size -->
|
||||
</style>
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue