Commit Graph

45 Commits

Author SHA1 Message Date
cketti 90f63ba057 Remove old setting for message content font size
- export new setting
- add upgrade code to convert old setting to new format
2014-02-13 04:22:45 +01:00
Sergii Pylypenko 67abde055a Change message body font size with slider, using new setTextZoom() WebView API, from 40% to 250% 2014-01-31 23:09:25 +02:00
Troy Rollo abb3318846 Alternative fix for issue 5697 - ASUS display bug 2014-01-30 19:56:30 +01:00
Joe Steele 094156cc2a Fix issue 6064: Inline images don't display on KitKat
Eliminate the invocation of
WebSettings.setBlockNetworkImage(boolean flag),
thus maintaining the the default setting of "false".

On Android versions prior to KitKat, this setting has no
effect on inline image attachments loaded with content:
URIs.  Such images would load regardless.

With KitKat, this setting does have an effect -- a
setting of "true" will block image attachments loaded
with content: URIs.

By removing this call, K-9 Mail behaves the same on KitKat
as on earlier Android versions, and the behavior on earlier
versions is unchanged.
2014-01-19 01:31:55 +01:00
Joe Steele e91e3f4e7d Eliminate needless use of reflection
The minSdkVersion was recently increased from 8 to 15.

WebSettings.setBlockNetworkLoads has been publicly available
since API level 8 (Froyo).

StrictMode has been publicly available since API level 9
(Gingerbread).
2014-01-10 18:27:55 -05:00
cketti 94296ec7df Revert "Add work-around for Asus Transformer WebView display bug"
This reverts commit 78428e287b.
2014-01-05 04:16:34 +01:00
Jasper Klein 78428e287b Add work-around for Asus Transformer WebView display bug 2013-12-16 17:11:28 +01:00
Jesse Vincent d4246a0976 With the new webview scrollview combo we've got loadinoverviewmode seems to behave better. 2013-11-07 10:39:37 -08:00
Joe Steele fa962e7bd7 Move AOSP files.
Patch RigidWebView for K9.
MessageWebView would need to extend RigidWebView.
2013-11-05 16:26:27 -05:00
Joe Steele 7b0082026c Revert auto-scroll changes that are no longer needed.
Revert "Only Jelly Bean seems to have the auto-scroll issue"

This reverts commit a3802a7a8e.

Revert "Hack around WebView's initial auto-scrolling past the message header"

This reverts commit 8dcc769c50.

Conflicts:

	src/com/fsck/k9/view/MessageWebView.java
2013-11-05 16:26:25 -05:00
Joe Steele 94a4585317 Switch to using NonLockingScrollView
This implements the AOSP Email solution for incorporating
a Webview inside a ScrollView, while still being able to
scroll diagonally.

This replaces the functionality of TitleBarWebView (which
is now removed).
2013-11-05 16:26:23 -05:00
cketti 79059e30da Remove override annotation so we can use the latest SDK to compile 2013-05-23 16:45:19 +02:00
Jesse Vincent 2e74d28da9 Merge branch 'Issue_4503_auto-fit_messages_option' of https://github.com/zjw/k-9 into zjw-Issue_4503_auto-fit_messages_option
* 'Issue_4503_auto-fit_messages_option' of https://github.com/zjw/k-9:
  Revert "Don't show a disabled preference if there is nothing a user can do to enable it."
  Fix indentation
  Correct preference version number.
  Issue 4503: Auto-fit messages option
  Don't show a disabled preference if there is nothing a user can do to enable it.
2013-05-07 21:49:12 -04:00
cketti 1c722876f1 Use very light grey instead of white for message text in dark theme 2013-04-24 01:05:11 +02:00
Joe Steele 84769d2433 Fix indentation 2013-04-11 22:26:32 -04:00
Joe Steele d9979cb1a2 Issue 4503: Auto-fit messages option
Create a preference option to automatically shrink messages
to fit the screen width (default setting is "shrink").
2013-04-04 17:11:17 -04:00
cketti 9ea46cf03b Merge branch 'Issue_4019_pinch_zoom'
Conflicts:
	src/com/fsck/k9/view/MessageWebView.java
2013-03-19 21:09:23 +01:00
cketti a3802a7a8e Only Jelly Bean seems to have the auto-scroll issue 2013-03-14 03:19:42 +01:00
cketti 8dcc769c50 Hack around WebView's initial auto-scrolling past the message header 2013-03-12 07:54:38 +01:00
Joe Steele c790fa73c1 Don't store the font-family preference with plain text messages.
Dynamically generate the CSS style for <pre> elements
for inclusion in the HTML <head> element when messages
are displayed.

This permits a user to change their font-family preference
for plain text messages and see the results immediately.

Obviously any old locally-stored messages that had their
font-family stored with them will continue to display using
that font-family, irrespective of the user's current
preference setting.
2013-03-01 18:48:46 -05:00
Joe Steele 548b8e07a6 Refactor code for MessageWebView.setText()
The MIME type for the supplied text was always text/html,
so there is no need to pass that as a parameter.
Furthermore, we are relying on it being text/html because
we are wrapping it with HTML code.

Likewise, change/simplify/rename AccessibleWebView.loadDataWithBaseURL().
2013-03-01 14:32:16 -05:00
Joe Steele e2c5229e85 Change when <html> tags are applied to messages.
Previously, <html>, <head>, & <body> tags were
attached to messages before they were stored locally.
But now that the <head> element also needs to include
a <meta> element (for proper MessageWebView display),
it seems unecesary to store all these tags with each
message.

Now the tags are no longer stored with the messages.  Instead,
MessageWebView applies the tags before displaying the message.

This also eliminates the need to upgrade an older
message database where all the old messages would have
otherwise needed to be wrapped with the new tags.
2013-03-01 12:59:59 -05:00
Joe Steele 28212bc04f Issue 4019 -- Fix inability to zoom out.
Thanks to davidgca...@gmail.com for references in
his comments 80 & 81.
2013-02-27 16:11:08 -05:00
Danny Baumann 8f3e61feab Convert theme setting value to an enum. 2013-02-08 15:24:03 +01:00
Danny Baumann 275700e482 Fix a number of build warnings.
This gets rid of about 50 warnings. Deprecation warnings still remain,
though.
2013-02-04 11:18:49 +01:00
m0viefreak 771b5122d6 MessageView theme toggle: change the theme of the whole activity and not just the background of the WebView
Using dark theme with white WebView background looks very ugly,
especially when a "download complete message" or a "show images"
button is present.

This change applies the theme to the whole activity.

Also changed the text for the toggle menu. It's also shorter now,
and isn't cut off anymore on hdpi/480px wide devices.
2012-09-15 07:22:25 +02:00
Bernhard Redl 76d8e11703 +toggle option in message view to change message display theme (dark,light) permanently (Issue 1674) 2012-09-14 03:16:36 +02:00
cketti 2e454f0af7 Removed "System zoom controls" setting
We always allow zooming but hide (provided the Android version supports
it) the on-screen zoom controls if the device supports multi-touch,
hence pinch-to-zoom.
2012-08-15 00:21:22 +02:00
Jesse Vincent 74f04e75e3 A first spike of integrating http://code.google.com/p/android-titlebar-webview
on my nexus 7, the webview and titlebar are overlapping each other, still
2012-08-02 16:49:21 -07:00
Jesse Vincent 17a6f79365 Better solution coming up!
Revert "Added fallback for when WebView.setEmbeddedTitleBar() is not available"

This reverts commit 6073b9d3fa.
2012-08-02 16:11:10 -07:00
cketti b72fcd9d4b Only use the single-column layout on known good Android versions
Fixes issue 3820
2012-07-13 23:04:04 +02:00
cketti a281b3401e Extracted code to disable Lint warning when using newer API 2012-07-07 15:03:23 +02:00
cketti 6073b9d3fa Added fallback for when WebView.setEmbeddedTitleBar() is not available
The (undocumented) method WebView.setEmbeddedTitleBar() was removed in
Android 4.1 which caused the message header to never be displayed.
This fallback is only a temporary fix. We really need to come up with a
solution that feels like the previous (setEmbeddedTitleBar) behavior.
2012-06-29 00:14:06 +02:00
Bernhard Redl 39f5587f30 Fixed Issue 4222. Use of the wrong method to get device-SDK version resulting in errors on ApiLevel 7 (2.1) devices. 2012-04-17 00:09:00 +02:00
cketti 4612ceb3c8 Enabled dark theme for MessageCompose and MessageView 2012-04-03 07:55:51 +02:00
cketti 309eeb72ac Got rid of the ScrollView in MessageView
The ScrollView around the WebView caused all sorts of problems. This
change removes the ScrollView and uses the undocumented method
WebView.setEmbeddedTitleBar() to set the MessageHeader view as "title
bar" of the WebView. This allows MessageHeader to scroll away making
more room for the WebView.
All of the "magic title bar" code was originally implemented by Jesse
for Kaiten.

Because WebView doesn't support a scrolling footer we can no longer
support scrolling buttons or attachments at the end of the message. Now
users can switch from message view to attachment view via a button just
below the message headers.

I also copied some code for which I was too lazy to create a separate
commit. It allows to display attachments we didn't use to show by
clicking on a "More..." button in the attachment view. Those
attachments are mostly images referenced by the HTML part (e.g.
background images).

Fixes issue 3291
2012-02-21 05:07:01 +01:00
cketti 07fa0c7264 Use Build.VERSION.SDK_INT instead of parsing Build.VERSION.SDK 2011-11-10 05:39:04 +01:00
Andrew Chen 763ff2752d Scroll to the last known position in the MessageView when rotating the screen. 2011-11-02 16:39:23 -07:00
Andrew Gaul 220e55603d Spelling corrections 2011-10-05 22:04:39 -07:00
Jesse Vincent 12d1097a24 Big, scary massive "ant astyle" to get us back to something
approximating AOSP coding standards.
2011-02-06 17:09:48 -05:00
cketti 8279092070 Fixed lots of warnings (unused imports/variables, missing annotations, etc.) 2011-01-18 23:54:49 +00:00
Jesse Vincent de806f7715 astyle 2011-01-06 16:55:08 +00:00
Andrew Chen 731ea27a24 Minor formatting cleanup. 2010-12-31 08:56:05 +00:00
Jesse Vincent daf5a9d704 lift emulateShiftHeld to our custom WebView subclass 2010-12-25 22:30:34 +00:00
Jesse Vincent 5f9eae1580 Extract MessageWebView specific code into a new class 2010-12-25 22:30:16 +00:00