themes code cleanup
This commit is contained in:
parent
38121ba796
commit
a8146dab60
12 changed files with 137 additions and 100 deletions
|
|
@ -48,7 +48,8 @@
|
||||||
<activity
|
<activity
|
||||||
android:label="@string/pref_help"
|
android:label="@string/pref_help"
|
||||||
android:name="io.github.sspanak.tt9.preferences.HelpActivity"
|
android:name="io.github.sspanak.tt9.preferences.HelpActivity"
|
||||||
android:exported="true">
|
android:exported="true"
|
||||||
|
android:theme="@style/TTheme.Preferences">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
@ -58,7 +59,8 @@
|
||||||
<activity
|
<activity
|
||||||
android:label="Log Messages"
|
android:label="Log Messages"
|
||||||
android:name="io.github.sspanak.tt9.preferences.LogsActivity"
|
android:name="io.github.sspanak.tt9.preferences.LogsActivity"
|
||||||
android:exported="true">
|
android:exported="true"
|
||||||
|
android:theme="@style/TTheme.Preferences">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
@ -68,6 +70,7 @@
|
||||||
<activity
|
<activity
|
||||||
android:excludeFromRecents="true"
|
android:excludeFromRecents="true"
|
||||||
android:label=""
|
android:label=""
|
||||||
android:name="io.github.sspanak.tt9.ui.dialogs.RequestPermissionDialog" />
|
android:name="io.github.sspanak.tt9.ui.dialogs.RequestPermissionDialog"
|
||||||
|
android:theme="@style/TTheme.Preferences" />
|
||||||
</application>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package io.github.sspanak.tt9.ui.dialogs;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.inputmethodservice.InputMethodService;
|
import android.inputmethodservice.InputMethodService;
|
||||||
|
import android.os.Build;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
|
@ -11,7 +12,9 @@ import io.github.sspanak.tt9.db.DataStore;
|
||||||
import io.github.sspanak.tt9.db.entities.AddWordResult;
|
import io.github.sspanak.tt9.db.entities.AddWordResult;
|
||||||
import io.github.sspanak.tt9.languages.Language;
|
import io.github.sspanak.tt9.languages.Language;
|
||||||
import io.github.sspanak.tt9.languages.LanguageCollection;
|
import io.github.sspanak.tt9.languages.LanguageCollection;
|
||||||
|
import io.github.sspanak.tt9.preferences.settings.SettingsStore;
|
||||||
import io.github.sspanak.tt9.util.ConsumerCompat;
|
import io.github.sspanak.tt9.util.ConsumerCompat;
|
||||||
|
import io.github.sspanak.tt9.util.ThemedContextBuilder;
|
||||||
|
|
||||||
public class AddWordDialog extends PopupDialog {
|
public class AddWordDialog extends PopupDialog {
|
||||||
public static final String TYPE = "tt9.popup_dialog.add_word";
|
public static final String TYPE = "tt9.popup_dialog.add_word";
|
||||||
|
|
@ -23,7 +26,17 @@ public class AddWordDialog extends PopupDialog {
|
||||||
|
|
||||||
|
|
||||||
AddWordDialog(@NonNull Context context, @NonNull Intent intent, ConsumerCompat<String> activityFinisher) {
|
AddWordDialog(@NonNull Context context, @NonNull Intent intent, ConsumerCompat<String> activityFinisher) {
|
||||||
super(context, activityFinisher);
|
super(
|
||||||
|
new ThemedContextBuilder()
|
||||||
|
.setConfiguration(context.getApplicationContext().getResources().getConfiguration())
|
||||||
|
.setContext(context)
|
||||||
|
.setSettings(new SettingsStore(context))
|
||||||
|
// The main theme does not work on Android <= 11 and the _AddWord theme does not work on 12+.
|
||||||
|
// Not sure why since they inherit from the same parent, but it is what it is.
|
||||||
|
.setTheme(Build.VERSION.SDK_INT < Build.VERSION_CODES.S ? R.style.TTheme_AddWord : R.style.TTheme)
|
||||||
|
.build(),
|
||||||
|
activityFinisher
|
||||||
|
);
|
||||||
|
|
||||||
title = context.getResources().getString(R.string.add_word_title);
|
title = context.getResources().getString(R.string.add_word_title);
|
||||||
OKLabel = context.getResources().getString(R.string.add_word_add);
|
OKLabel = context.getResources().getString(R.string.add_word_add);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package io.github.sspanak.tt9.ui.main;
|
package io.github.sspanak.tt9.ui.main;
|
||||||
|
|
||||||
import android.content.res.Configuration;
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.view.ContextThemeWrapper;
|
import android.view.ContextThemeWrapper;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
@ -14,6 +13,7 @@ import java.util.ArrayList;
|
||||||
import io.github.sspanak.tt9.R;
|
import io.github.sspanak.tt9.R;
|
||||||
import io.github.sspanak.tt9.ime.TraditionalT9;
|
import io.github.sspanak.tt9.ime.TraditionalT9;
|
||||||
import io.github.sspanak.tt9.ui.main.keys.SoftKey;
|
import io.github.sspanak.tt9.ui.main.keys.SoftKey;
|
||||||
|
import io.github.sspanak.tt9.util.ThemedContextBuilder;
|
||||||
|
|
||||||
abstract class BaseMainLayout {
|
abstract class BaseMainLayout {
|
||||||
protected final TraditionalT9 tt9;
|
protected final TraditionalT9 tt9;
|
||||||
|
|
@ -37,27 +37,15 @@ abstract class BaseMainLayout {
|
||||||
@NonNull protected ArrayList<SoftKey> getKeys() { return keys; }
|
@NonNull protected ArrayList<SoftKey> getKeys() { return keys; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* getThemedContext
|
|
||||||
* 1. Overrides the system dark/light them with the one in our settings.
|
|
||||||
* 2. Fixes this error log: "View class SoftKeyXXX is an AppCompat widget that can only be used
|
|
||||||
* with a Theme.AppCompat theme (or descendant)."
|
|
||||||
*/
|
|
||||||
private ContextThemeWrapper getThemedContext() {
|
|
||||||
int nightModeFlag = tt9.getSettings().getDarkTheme() ? Configuration.UI_MODE_NIGHT_YES : Configuration.UI_MODE_NIGHT_NO;
|
|
||||||
Configuration config = new Configuration(tt9.getResources().getConfiguration());
|
|
||||||
config.uiMode = nightModeFlag | (config.uiMode & ~Configuration.UI_MODE_NIGHT_MASK);
|
|
||||||
|
|
||||||
ContextThemeWrapper themedCtx = new ContextThemeWrapper(tt9, R.style.TTheme);
|
|
||||||
themedCtx.applyOverrideConfiguration(config);
|
|
||||||
|
|
||||||
return themedCtx;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
protected View getView() {
|
protected View getView() {
|
||||||
if (view == null) {
|
if (view == null) {
|
||||||
view = View.inflate(getThemedContext(), xml, null);
|
ContextThemeWrapper themedContext = new ThemedContextBuilder()
|
||||||
|
.setConfiguration(tt9.getResources().getConfiguration())
|
||||||
|
.setContext(tt9)
|
||||||
|
.setSettings(tt9.getSettings())
|
||||||
|
.setTheme(R.style.TTheme)
|
||||||
|
.build();
|
||||||
|
view = View.inflate(themedContext, xml, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
package io.github.sspanak.tt9.util;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.res.Configuration;
|
||||||
|
import android.view.ContextThemeWrapper;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import io.github.sspanak.tt9.preferences.settings.SettingsStore;
|
||||||
|
|
||||||
|
public class ThemedContextBuilder {
|
||||||
|
private Configuration configuration;
|
||||||
|
private Context context;
|
||||||
|
private int nightModeFlag;
|
||||||
|
private int theme;
|
||||||
|
|
||||||
|
|
||||||
|
public ThemedContextBuilder setConfiguration(@NonNull Configuration configuration) {
|
||||||
|
this.configuration = new Configuration(configuration);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ThemedContextBuilder setContext(@NonNull Context context) {
|
||||||
|
this.context = context;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ThemedContextBuilder setSettings(@NonNull SettingsStore settings) {
|
||||||
|
nightModeFlag = settings.getDarkTheme() ? Configuration.UI_MODE_NIGHT_YES : Configuration.UI_MODE_NIGHT_NO;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ThemedContextBuilder setTheme(int theme) {
|
||||||
|
this.theme = theme;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* getThemedContext
|
||||||
|
* 1. Overrides the system dark/light them with the one in our settings.
|
||||||
|
* 2. Fixes this error log: "View class SoftKeyXXX is an AppCompat widget that can only be used
|
||||||
|
* with a Theme.AppCompat theme (or descendant)."
|
||||||
|
*/
|
||||||
|
public ContextThemeWrapper build() {
|
||||||
|
configuration.uiMode = nightModeFlag | (configuration.uiMode & ~Configuration.UI_MODE_NIGHT_MASK);
|
||||||
|
ContextThemeWrapper themedCtx = new ContextThemeWrapper(context, theme);
|
||||||
|
themedCtx.applyOverrideConfiguration(configuration);
|
||||||
|
|
||||||
|
return themedCtx;
|
||||||
|
}
|
||||||
|
}
|
||||||
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"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<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>
|
</resources>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
<!--*******************************************
|
||||||
|
Keyboard
|
||||||
|
*******************************************-->
|
||||||
|
|
||||||
<color name="keyboard_background">#292e33</color>
|
<color name="keyboard_background">#292e33</color>
|
||||||
<color name="keyboard_text_color">#d4d5d6</color>
|
<color name="keyboard_text_color">#d4d5d6</color>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,3 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<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>
|
</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"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<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">
|
<style name="TTheme.AddWord" parent="Theme.Material3.DayNight.Dialog.Alert">
|
||||||
<item name="preferenceTheme">@style/TTheme.PreferenceOverlay</item>
|
<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 -->
|
<!-- title bar -->
|
||||||
<item name="tint">@color/material_dynamic_neutral20</item> <!-- back button color -->
|
<item name="tint">@color/prefs_title_text_color</item>
|
||||||
<item name="colorSurfaceContainer">@color/material_dynamic_neutral_variant90</item> <!-- title bar background -->
|
<item name="colorOnSurface">@color/prefs_title_text_color</item>
|
||||||
|
<item name="colorSurfaceContainer">@color/prefs_title_background</item>
|
||||||
|
|
||||||
<!-- page -->
|
<!-- page -->
|
||||||
<item name="android:windowBackground">@color/material_dynamic_neutral95</item> <!-- page background -->
|
<item name="android:windowBackground">@color/prefs_page_background</item> <!-- page background -->
|
||||||
<item name="colorSecondary">@color/material_dynamic_primary40</item> <!-- category title -->
|
<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:textAppearanceListItem">@style/TextAppearance.Material3.TitleLarge</item> <!-- preference title -->
|
||||||
|
|
||||||
<!-- <item name="android:popupWindowStyle">@style/AppDropDownStyle</item> <!– dropdown background –>-->
|
<!-- <item name="android:popupWindowStyle">@style/AppDropDownStyle</item> <!– dropdown background –>-->
|
||||||
|
|
@ -30,11 +37,11 @@
|
||||||
-->
|
-->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="TTheme.PreferenceOverlay" parent="@style/PreferenceThemeOverlay">
|
<style name="TTheme.Preferences.Overlay" parent="@style/PreferenceThemeOverlay">
|
||||||
<item name="switchPreferenceCompatStyle">@style/TTheme.Switch</item>
|
<item name="switchPreferenceCompatStyle">@style/TTheme.Preferences.Switch</item>
|
||||||
</style>
|
</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>
|
<item name="widgetLayout">@layout/pref_switch_v31</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
@ -42,15 +49,4 @@
|
||||||
<!-- <item name="android:background">@color/material_dynamic_neutral_variant90</item>-->
|
<!-- <item name="android:background">@color/material_dynamic_neutral_variant90</item>-->
|
||||||
<!-- <item name="popupMenuBackground">@color/material_dynamic_neutral_variant90</item>-->
|
<!-- <item name="popupMenuBackground">@color/material_dynamic_neutral_variant90</item>-->
|
||||||
<!-- </style>-->
|
<!-- </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>
|
</resources>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,10 @@
|
||||||
What colors look good together: https://www.canva.com/colors/color-wheel/
|
What colors look good together: https://www.canva.com/colors/color-wheel/
|
||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
|
<!--*******************************************
|
||||||
|
Keyboard
|
||||||
|
*******************************************-->
|
||||||
|
|
||||||
<color name="keyboard_background">#e8eaed</color>
|
<color name="keyboard_background">#e8eaed</color>
|
||||||
<color name="keyboard_text_color">#3d3d3f</color>
|
<color name="keyboard_text_color">#3d3d3f</color>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,14 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<style name="TTheme" parent="Theme.MaterialComponents.DayNight" />
|
<style name="TTheme" parent="Theme.MaterialComponents.DayNight" />
|
||||||
<style name="TTheme.Preferences" parent="Theme.AppCompat.DayNight" />
|
|
||||||
|
|
||||||
|
<style name="TTheme.AddWord" parent="Theme.AppCompat.DayNight.Dialog.Alert">
|
||||||
<style name="TTheme.AddWord" parent="Theme.AppCompat.Dialog.Alert">
|
|
||||||
<item name="windowNoTitle">true</item> <!-- hide some weird floating rectangle above the dialog -->
|
<item name="windowNoTitle">true</item> <!-- hide some weird floating rectangle above the dialog -->
|
||||||
</style>
|
</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>
|
<item name="android:background">@color/keyboard_background</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue