mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Improve MessageWebView display.
Now that MessageWebView has 'setUseWideViewPort(true)', the wide view port is excessively wide. It turns out Android is using a fixed width of 980 px, so that even plain text messages (which are already wrapped to fit the screen) have a large empty area beside them when scrolled to the left. Injecting a meta tag in the html header fixes the problem.
This commit is contained in:
parent
28212bc04f
commit
731022339d
@ -127,7 +127,8 @@ public class HtmlConverter {
|
|||||||
private static final int MAX_SMART_HTMLIFY_MESSAGE_LENGTH = 1024 * 256 ;
|
private static final int MAX_SMART_HTMLIFY_MESSAGE_LENGTH = 1024 * 256 ;
|
||||||
|
|
||||||
public static final String getHtmlHeader() {
|
public static final String getHtmlHeader() {
|
||||||
return "<html><head/><body>";
|
// Include a meta tag so the MessageWebView will not use a fixed viewport width of 980 px
|
||||||
|
return "<html><head><meta name=\"viewport\" content=\"width=device-width\"/></head><body>";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String getHtmlFooter() {
|
public static final String getHtmlFooter() {
|
||||||
|
Loading…
Reference in New Issue
Block a user