themes code cleanup
This commit is contained in:
parent
38121ba796
commit
a8146dab60
12 changed files with 137 additions and 100 deletions
14
app/src/main/res/values-night-v31/colors.xml
Normal file
14
app/src/main/res/values-night-v31/colors.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!--*******************************************
|
||||
Preferences
|
||||
*******************************************-->
|
||||
|
||||
<!-- title bar -->
|
||||
<color name="prefs_title_background">@color/material_dynamic_neutral_variant30</color>
|
||||
<color name="prefs_title_text_color">@color/material_dynamic_neutral90</color>
|
||||
|
||||
<!-- page -->
|
||||
<color name="prefs_page_background">@color/material_dynamic_neutral10</color>
|
||||
<color name="prefs_category_title_color">@color/material_dynamic_primary70</color>
|
||||
</resources>
|
||||
|
|
@ -1,43 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="TTheme" parent="Theme.Material3.DynamicColors.Dark" />
|
||||
|
||||
<style name="TTheme.Preferences" parent="Theme.Material3.DynamicColors.Dark">
|
||||
<item name="preferenceTheme">@style/TTheme.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="TTheme.PreferenceOverlay" parent="@style/PreferenceThemeOverlay">
|
||||
<item name="switchPreferenceCompatStyle">@style/TTheme.Switch</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="TTheme.Switch" 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>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!--*******************************************
|
||||
Keyboard
|
||||
*******************************************-->
|
||||
|
||||
<color name="keyboard_background">#292e33</color>
|
||||
<color name="keyboard_text_color">#d4d5d6</color>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- <style name="TTheme" parent="Theme.AppCompat" />-->
|
||||
|
||||
<!-- <style name="TTheme.Colored.Key" parent="TTheme.Key">-->
|
||||
<!-- <item name="android:textColor">@color/button_text</item>-->
|
||||
<!-- <item name="android:color">@color/dark_button_color</item>-->
|
||||
<!-- <item name="android:textColor">@color/dark_button_color</item>-->
|
||||
<!-- <item name="android:textColorPrimary">@color/dark_button_color</item>-->
|
||||
<!-- <item name="android:tint">@color/dark_button_color</item>-->
|
||||
<!-- <item name="tint">@color/dark_button_color</item>-->
|
||||
<!-- </style>-->
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
14
app/src/main/res/values-v31/colors.xml
Normal file
14
app/src/main/res/values-v31/colors.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!--*******************************************
|
||||
Preferences
|
||||
*******************************************-->
|
||||
|
||||
<!-- title bar -->
|
||||
<color name="prefs_title_background">@color/material_dynamic_neutral_variant90</color>
|
||||
<color name="prefs_title_text_color">@color/material_dynamic_neutral20</color>
|
||||
|
||||
<!-- page -->
|
||||
<color name="prefs_page_background">@color/material_dynamic_neutral95</color>
|
||||
<color name="prefs_category_title_color">@color/material_dynamic_primary40</color>
|
||||
</resources>
|
||||
|
|
@ -1,17 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="TTheme" parent="Theme.Material3.DynamicColors.Light" />
|
||||
<style name="TTheme" parent="Theme.Material3.DynamicColors.DayNight" />
|
||||
|
||||
<style name="TTheme.Preferences" parent="Theme.Material3.DynamicColors.Light">
|
||||
<item name="preferenceTheme">@style/TTheme.PreferenceOverlay</item>
|
||||
<style name="TTheme.AddWord" parent="Theme.Material3.DayNight.Dialog.Alert">
|
||||
<item name="windowNoTitle">true</item> <!-- hide some weird floating rectangle above the dialog -->
|
||||
<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>
|
||||
|
||||
<style name="TTheme.Preferences" parent="TTheme">
|
||||
<item name="preferenceTheme">@style/TTheme.Preferences.Overlay</item>
|
||||
|
||||
<!-- title bar -->
|
||||
<item name="tint">@color/material_dynamic_neutral20</item> <!-- back button color -->
|
||||
<item name="colorSurfaceContainer">@color/material_dynamic_neutral_variant90</item> <!-- title bar background -->
|
||||
<item name="tint">@color/prefs_title_text_color</item>
|
||||
<item name="colorOnSurface">@color/prefs_title_text_color</item>
|
||||
<item name="colorSurfaceContainer">@color/prefs_title_background</item>
|
||||
|
||||
<!-- page -->
|
||||
<item name="android:windowBackground">@color/material_dynamic_neutral95</item> <!-- page background -->
|
||||
<item name="colorSecondary">@color/material_dynamic_primary40</item> <!-- category title -->
|
||||
<item name="android:windowBackground">@color/prefs_page_background</item> <!-- page background -->
|
||||
<item name="colorSecondary">@color/prefs_category_title_color</item> <!-- category title -->
|
||||
<item name="android:textAppearanceListItem">@style/TextAppearance.Material3.TitleLarge</item> <!-- preference title -->
|
||||
|
||||
<!-- <item name="android:popupWindowStyle">@style/AppDropDownStyle</item> <!– dropdown background –>-->
|
||||
|
|
@ -30,11 +37,11 @@
|
|||
-->
|
||||
</style>
|
||||
|
||||
<style name="TTheme.PreferenceOverlay" parent="@style/PreferenceThemeOverlay">
|
||||
<item name="switchPreferenceCompatStyle">@style/TTheme.Switch</item>
|
||||
<style name="TTheme.Preferences.Overlay" parent="@style/PreferenceThemeOverlay">
|
||||
<item name="switchPreferenceCompatStyle">@style/TTheme.Preferences.Switch</item>
|
||||
</style>
|
||||
|
||||
<style name="TTheme.Switch" parent="@style/Preference.SwitchPreferenceCompat.Material">
|
||||
<style name="TTheme.Preferences.Switch" parent="@style/Preference.SwitchPreferenceCompat.Material">
|
||||
<item name="widgetLayout">@layout/pref_switch_v31</item>
|
||||
</style>
|
||||
|
||||
|
|
@ -42,15 +49,4 @@
|
|||
<!-- <item name="android:background">@color/material_dynamic_neutral_variant90</item>-->
|
||||
<!-- <item name="popupMenuBackground">@color/material_dynamic_neutral_variant90</item>-->
|
||||
<!-- </style>-->
|
||||
|
||||
<style name="TTheme.AddWord" parent="Theme.Material3.Light.Dialog.Alert">
|
||||
<item name="windowNoTitle">true</item> <!-- hide some weird floating rectangle above the dialog -->
|
||||
<item name="android:textColor">@color/material_dynamic_neutral10</item> <!-- headline (title) text color -->
|
||||
<item name="android:textColorPrimary">@color/material_dynamic_neutral_variant10</item> <!-- supporting text (body text) color -->
|
||||
<item name="android:background">@color/material_dynamic_neutral95</item> <!-- container background -->
|
||||
<item name="colorPrimary">@color/material_dynamic_primary20</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>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,10 @@
|
|||
What colors look good together: https://www.canva.com/colors/color-wheel/
|
||||
-->
|
||||
<resources>
|
||||
<!--*******************************************
|
||||
Keyboard
|
||||
*******************************************-->
|
||||
|
||||
<color name="keyboard_background">#e8eaed</color>
|
||||
<color name="keyboard_text_color">#3d3d3f</color>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="TTheme" parent="Theme.MaterialComponents.DayNight" />
|
||||
<style name="TTheme.Preferences" parent="Theme.AppCompat.DayNight" />
|
||||
|
||||
|
||||
<style name="TTheme.AddWord" parent="Theme.AppCompat.Dialog.Alert">
|
||||
<style name="TTheme.AddWord" parent="Theme.AppCompat.DayNight.Dialog.Alert">
|
||||
<item name="windowNoTitle">true</item> <!-- hide some weird floating rectangle above the dialog -->
|
||||
</style>
|
||||
|
||||
<style name="TTheme.Preferences" parent="Theme.AppCompat.DayNight" />
|
||||
|
||||
<style name="TTheme.Keyboard">
|
||||
<style name="TTheme.Keyboard" parent="TTheme">
|
||||
<item name="android:background">@color/keyboard_background</item>
|
||||
</style>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue