1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

Display a dark-themed "Send as" dialog when using the dark theme on HC+

This commit is contained in:
cketti 2012-09-16 03:24:40 +02:00
parent 163557ae8a
commit d5b9aec39f
5 changed files with 18 additions and 4 deletions

View File

@ -4,7 +4,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="#cccccc"
android:background="?attr/backgroundColorChooseAccountHeader"
android:gravity="left|center_vertical">
<View
android:id="@+id/chip"

View File

@ -1,9 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- We need to override the dark theme to *not* use the workarounds of Theme.K9.Dark in
res/values/ -->
<style name="Theme.K9.Dark" parent="Theme.K9.Dark.Base">
</style>
<style name="Theme.K9.Dialog.Dark" parent="Theme.K9.Dark">
<item name="backgroundColorChooseAccountHeader">#404040</item>
</style>
</resources>

View File

@ -41,6 +41,7 @@
<attr name="iconMenuShowFolders" format="reference" />
<attr name="textColorPrimaryRecipientDropdown" format="reference" />
<attr name="textColorSecondaryRecipientDropdown" format="reference" />
<attr name="backgroundColorChooseAccountHeader" format="color" />
</declare-styleable>
</resources>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="Theme.K9.Light.Base" parent="Theme.Sherlock.Light">
<item name="iconFolder">@drawable/folder_light</item>
@ -95,4 +95,11 @@
<item name="textColorSecondaryRecipientDropdown">@android:color/secondary_text_light</item>
</style>
<style name="Theme.K9.Dialog.Light" parent="Theme.K9.Light">
<item name="backgroundColorChooseAccountHeader">#cccccc</item>
</style>
<!-- Prior to Honeycomb we always use the light theme for dialogs -->
<style name="Theme.K9.Dialog.Dark" parent="Theme.K9.Dialog.Light" />
</resources>

View File

@ -2328,7 +2328,9 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
.create();
case DIALOG_CHOOSE_IDENTITY:
Context context = new ContextThemeWrapper(this,
K9.getK9ThemeResourceId(K9.THEME_LIGHT));
(K9.getK9Theme() == K9.THEME_LIGHT) ?
R.style.Theme_K9_Dialog_Light :
R.style.Theme_K9_Dialog_Dark);
Builder builder = new AlertDialog.Builder(context);
builder.setTitle(R.string.send_as);
final IdentityAdapter adapter = new IdentityAdapter(context);