1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00
Commit Graph

65 Commits

Author SHA1 Message Date
cketti
a725099693 Merge pull request #499 from k9mail/remove_apg_interface
Remove APG legacy interface
2014-11-12 21:08:46 +01:00
Art O Cathain
010d8c9f7e always use import for UrlEncodingHelper 2014-09-29 18:06:21 +01:00
Art O Cathain
c438bc1222 remove some more catches 2014-09-28 12:09:34 +01:00
cketti
352fb8fd25 Remove legacy APG interface 2014-09-18 23:20:49 +02:00
Christian Frommeyer
91ef5fa816 Extracted LocalFolder and LocalMessage definition from LocalStore 2014-09-11 20:26:40 +02:00
Christian Frommeyer
89ba2c510b More nested classes extracted from LocalStore. 2014-09-11 20:26:40 +02:00
Christian Frommeyer
038fceabf0 Move LocalStore to new subpackage to prepare decomposition of nested
classes.
2014-09-11 20:26:39 +02:00
Joe Steele
028f6f9055 Remove AccessibleWebView
Only used on pre-ICS devices
2014-08-19 17:17:48 -04:00
cketti
ba69b3a647 Remove ActionBarSherlock 2014-06-21 17:09:45 +02:00
Dominik Schürmann
974a73b07d Use new account extra to allow multiple accounts 2014-03-26 22:11:19 +01:00
Dominik Schürmann
4a69ef1509 New OpenPGP Provider API 2014-03-02 16:51:47 +01:00
cketti
a62f7aaa29 Don't crash when startActivity() fails
Fixes issue 6201
2014-01-31 20:05:00 +01: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
Joe Steele
fce39f0fce HTML tag cleanup
Effective with earlier commit e2c5229e85,
messages are wrapped with <html> tags at display time, rather than
when messages are saved.

For consistency, this commit removes tags from a status message, because
they, too, will be added back at display time.

Closes pull request 286.
2013-08-01 19:38:48 -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
e77c341542 Avoid NPE reported via Play Store 2013-03-05 03:31:18 +01: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
6a844a2553 Remove unused code in HtmlConverter.
HtmlConverter.getHtmlHeader() and getHtmlFooter() are
no longer used.  Remove them and other related code.
2013-03-01 14:30:42 -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
m0viefreak
5fa7e65816 MessageView: another theme fix
- The attachments view still had the wrong background color in case
  of different global and message themes.

- The attachments view used the activity LayoutInflater, but it needs
  to use the one of the fragment.

- The background drawable for the attachments used transparency, and
  thus was completely invisible in the black theme. Fix it by adding
  another one for the black theme.
2013-02-05 23:12:52 +01:00
Jesse Vincent
0b04e526b4 Because we're not reusing the message view, we don't need to force scrolling. This has the side effect of cutting down on a momentary flash of message header area on display. 2013-02-05 12:26:16 -05:00
Danny Baumann
1dda0cfdbd Another unused import. 2013-02-05 14:32:56 +01:00
m0viefreak
a74d57cb71 MessageView: Theme fix when global and message view theme differ
- Since the split-view change, MessageView is only a fragment, so we
  can't call setTheme() anymore so easily.
  Instead, use a ContextThemeWrapper and use that to inflate the
  layout. This way the message header and attachment view
  are styled correctly.

- The HTC WebView fix in SingleMessageView was returning the wrong
  background color, when message view theme and global theme differ,
  because it always used the global theme to retrieve it.
  Fix: Specifically put the light/dark values in the themes.xml,
  and get them using getContext().getTheme().resolveAttribute().
  getContext() will use the ContextThemeWrapper from above, so
  even if the global and message view themes differ, it aleays
  returns the correct one.
  The getThemeBackgroundColor() method added to the K9ActivityMagic
  interface in 309eeb72ac is now not
  needed anymore, and was removed.
2013-02-04 19:30:40 +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
cketti
8a226972a5 Extracted functionality common to most activities to K9ActivityCommon 2012-10-05 18:14:07 +02:00
cketti
bbcc4988ba Converted message view to a fragment
The fragment should be fully functional. The only thing missing is the
animation when showing the next/previous message.
2012-10-05 18:14:07 +02: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
Andrew Chen
9fbb2b4836 Show the subject line in the MessageHeader if the ActionBar title was truncated. 2012-09-09 13:45:33 -07:00
cketti
c0153a1636 Display decrypted/verified messages like text/plain messages
Nicely format the text instead of wrapping it in <pre> tags.
2012-08-27 17:38:10 +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
5467a71cbf Added work-around for image loading bug in Android 4.0's WebView
Fixes issue 3997
2012-07-16 02:14:42 +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
cketti
ee1288ee75 Disable special screen reader mode on ICS
The default message view is accessible enough.
Info and original patch provided by Nolan Darilek.

See issue 4153
2012-06-18 03:17:02 +02:00
cketti
5041a2c832 SingleMessageView cleanup 2012-04-04 10:04:57 +02:00
Bernhard Redl
eba886b85d Render html code to make white on DarkTheme (fixes 4196) 2012-04-04 01:46:22 +02:00
cketti
4612ceb3c8 Enabled dark theme for MessageCompose and MessageView 2012-04-03 07:55:51 +02:00
cketti
5819d27394 Added long-press popup menu to WebView in SingleMessageView
Actions:
- Open link for viewing
- Share link
- Copy link to clipboard
- View image
- Download/save image
- Copy image URL to clipboard
- Call number
- Save phone number to Contacts
- Copy phone number to clipboard
- Send mail
- Save to Contacts
- Copy email address to clipboard

This is based on work done by kernelhunter92 and ShellZero.

Fixed issue 1248
2012-04-01 22:46:36 +02:00
m0viefreak
f1baa8f461 invalidate message content WebView when the message header changes
This fixes redraw issues where text appears doubled or is cut off
2012-03-02 05:16:58 +01:00
cketti
206c559236 Don't handle exceptions in AttachmentView.populateFromPart()
We now catch exceptions in SingleMessageView.renderAttachments(). This
way we can avoid adding AttachmentViews that couldn't be properly
populated.
2012-02-27 21:45:47 +01:00
cketti
7c97527d73 Allow message header to scroll when displaying the attachment list 2012-02-25 00:43:09 +01:00
cketti
4e12dc154e Save/restore instance state for SingleMessageView 2012-02-24 03:43:42 +01:00
cketti
2c09d75afa Switch to "message view" when displayMessageBody() is called 2012-02-23 00:10:47 +01:00
cketti
18c96f94d6 Retain "show pictures" state on orientation change 2012-02-22 23:26:59 +01:00
cketti
2b54599c2b Small code cleanup 2012-02-22 22:56:05 +01:00
cketti
0ef9c516be Moved click listener from MessageView to SingleMessageView 2012-02-22 22:44:31 +01:00
cketti
ec6645bf6a Avoid creating new objects for handling click events 2012-02-21 16:21:47 +01: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
53ae9d7fe7 Avoid exception when a screen reader is installed but not active. 2012-02-16 14:52:56 +01:00