mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 09:08:49 -05:00
Fix a display bug by extending the system themes
This commit is contained in:
parent
52b5c567ef
commit
9d854a0f6f
@ -1,4 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.K9Dialog" parent="@android:Theme.Light">
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowBackground">@drawable/popup_background</item>
|
||||
@ -6,8 +8,15 @@
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
|
||||
<item name="android:windowContentOverlay">@drawable/panel_separator</item>
|
||||
|
||||
</style>
|
||||
|
||||
<!--
|
||||
Fix a bug with AutoCompleteTextView
|
||||
See https://code.google.com/p/android/issues/detail?id=5237
|
||||
-->
|
||||
<style name="Widget.K9.AutoCompleteTextView" parent="@android:style/Widget.AutoCompleteTextView">
|
||||
<item name="android:textColor">@android:color/primary_text_light</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
|
12
res/values/themes.xml
Normal file
12
res/values/themes.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.K9.Light" parent="android:Theme.Light">
|
||||
<item name="android:autoCompleteTextViewStyle">@style/Widget.K9.AutoCompleteTextView</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.K9.Dark" parent="@android:style/Theme">
|
||||
<item name="android:autoCompleteTextViewStyle">@style/Widget.K9.AutoCompleteTextView</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -697,7 +697,7 @@ public class K9 extends Application {
|
||||
}
|
||||
|
||||
public static int getK9ThemeResourceId(int theme) {
|
||||
return (theme == THEME_LIGHT) ? android.R.style.Theme_Light : android.R.style.Theme;
|
||||
return (theme == THEME_LIGHT) ? R.style.Theme_K9_Light : R.style.Theme_K9_Dark;
|
||||
}
|
||||
|
||||
public static int getK9ThemeResourceId() {
|
||||
|
Loading…
Reference in New Issue
Block a user