diff --git a/res/values/strings.xml b/res/values/strings.xml index b609fed61..6b78eb0c1 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -164,8 +164,8 @@ http://k9mail.googlecode.com/ Hide full header Select text - Change background to black - Change background to white + Switch to dark theme + Switch to light theme Mark as unread Add Cc/Bcc diff --git a/src/com/fsck/k9/activity/MessageView.java b/src/com/fsck/k9/activity/MessageView.java index 7b0be8de3..4fd8d94f8 100644 --- a/src/com/fsck/k9/activity/MessageView.java +++ b/src/com/fsck/k9/activity/MessageView.java @@ -303,6 +303,7 @@ public class MessageView extends K9Activity implements OnClickListener { @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); + setTheme(K9.getK9ThemeResourceId(K9.getK9MessageViewTheme())); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.message_view); @@ -623,7 +624,14 @@ public class MessageView extends K9Activity implements OnClickListener { return null; } }.execute(); - displayMessage(mMessageReference); + + // restart the current activity, so that the theme change can be applied + Intent intent = getIntent(); + intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); + finish(); + overridePendingTransition(0, 0); // disable animations to speed up the switch + startActivity(intent); + overridePendingTransition(0, 0); } private void startRefileActivity(int activity) { diff --git a/src/com/fsck/k9/view/MessageWebView.java b/src/com/fsck/k9/view/MessageWebView.java index 44c8559e7..1e82554ec 100644 --- a/src/com/fsck/k9/view/MessageWebView.java +++ b/src/com/fsck/k9/view/MessageWebView.java @@ -98,9 +98,6 @@ public class MessageWebView extends TitleBarWebView { // Black theme should get a black webview background // we'll set the background of the messages on load this.setBackgroundColor(0xff000000); - } else { - // multitoggle requires reset to white - this.setBackgroundColor(0xffffffff); } final WebSettings webSettings = this.getSettings(); diff --git a/src/com/fsck/k9/view/SingleMessageView.java b/src/com/fsck/k9/view/SingleMessageView.java index 829c26408..4e32a6c71 100644 --- a/src/com/fsck/k9/view/SingleMessageView.java +++ b/src/com/fsck/k9/view/SingleMessageView.java @@ -720,7 +720,7 @@ public class SingleMessageView extends LinearLayout implements OnClickListener, showShowPicturesAction(false); mAttachments.removeAllViews(); mHiddenAttachments.removeAllViews(); - mMessageContentView.configure(); + /* * Clear the WebView content *