Commit Graph

41 Commits

Author SHA1 Message Date
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
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 Chen f884e967c9 Use MimeHeader.* constants when referring to content headers. Minor whitespace changes. 2011-11-02 08:34:06 -07:00
cketti 88dc36da8a Added a check to prevent an ArrayIndexOutOfBoundsException
Fixes issue 3683
2011-10-01 20:30:22 +02:00
Bernhard Redl ab4bae214f Make attachment saving respect the new preference. Allow long-press to
choose a folder.

(new constant renamed from CHOOSE_FOLDER to CHOOSE directory for
clarity)
2011-04-24 14:01:03 +10:00
Jesse Vincent ea6e5e0e62 Lifting more of the "Show this message" over to the SingleMessageView 2011-02-14 13:40:49 -05:00
Jesse Vincent 5aad882976 Move the "isScreenReader" active code down into the MessageView 2011-02-14 13:32:14 -05:00
Jesse Vincent 04bc32db9e move a call to setLoadPictures down 2011-02-14 13:31:43 -05:00
Jesse Vincent 043535f7a5 Migrate a method into SingleMessageView 2011-02-14 13:31:34 -05:00
Jesse Vincent 0d0415e705 use a single layout inflater for loading attachments 2011-02-11 12:13:18 -05:00
Jesse Vincent 20623dc18a slight clean up to cryptoprovider view interface 2011-02-11 12:12:09 -05:00
Jesse Vincent abc921093c refactor display of the download button 2011-02-11 12:11:21 -05:00
Jesse Vincent 9deea33426 re-enable setOnFlagListener 2011-02-11 12:10:45 -05:00
Jesse Vincent 06baf3f602 simplify the "load a url for the message body" signature 2011-02-11 12:09:47 -05:00
Jesse Vincent 49b35f9236 More reshuffling toward having a reusable "Show a message" widget - what
should eventually be a Fragment.

Lifted part of the cryptoView back up to the activity since the
factoring felt forced.
2011-02-11 10:59:31 -05:00
Jesse Vincent d634bcb381 Switch the Message view to our new SingleMessageView 2011-02-10 19:31:15 -05:00