1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

Fix a display bug by extending the system themes

This commit is contained in:
cketti 2012-04-06 09:46:23 +02:00
parent 52b5c567ef
commit 9d854a0f6f
3 changed files with 23 additions and 2 deletions

View File

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<style name="Theme.K9Dialog" parent="@android:Theme.Light"> <style name="Theme.K9Dialog" parent="@android:Theme.Light">
<item name="android:windowFrame">@null</item> <item name="android:windowFrame">@null</item>
<item name="android:windowBackground">@drawable/popup_background</item> <item name="android:windowBackground">@drawable/popup_background</item>
@ -6,8 +8,15 @@
<item name="android:windowIsFloating">true</item> <item name="android:windowIsFloating">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item> <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
<item name="android:windowContentOverlay">@drawable/panel_separator</item> <item name="android:windowContentOverlay">@drawable/panel_separator</item>
</style> </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> </resources>

12
res/values/themes.xml Normal file
View 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>

View File

@ -697,7 +697,7 @@ public class K9 extends Application {
} }
public static int getK9ThemeResourceId(int theme) { 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() { public static int getK9ThemeResourceId() {