Commit Graph

2923 Commits

Author SHA1 Message Date
m0viefreak 8d4a82ba0e message view: fix subject bugs
- Android does not support ellipsize in combination with maxlines
  for TextViews. This caused getEllipsisCount() in MessageTitleView
  to always fail, and the full subject was never shown in the regular
  headers area when needed.
  To work around that, check for ourselves whether the text is
  longer than 2, and ellipsize manually.

- Clicking the star button on a message caused the subject line to
  re-appear, even if it fits in the action bar title without being
  cut off. This was caused by MessageHeader.populate(), which always
  set the subject to visible.
  As a workaround: Only set subject to visible in case populate()
  actually shows a new message.

- delete res/layout/actionbar_message_view.xml, its already present
  in the actionbar_custom.xml
2013-02-11 13:47:31 +01:00
m0viefreak 865151fef8 merge date and time font size preference into one
The header changes merged those, so remove the now unneeded preferece, too.
2013-02-11 13:05:52 +01:00
Danny Baumann ee65217ac3 Properly clear out old state when receiving a new intent.
This fixes the following scenario:
- Get a mail notification
- Click on notification -> message view appears
- Press home
- Get a new notification
- Click on notification -> last instead of new message is displayed
2013-02-11 09:19:42 +01:00
Danny Baumann 3807d2881d Fix warnings. 2013-02-11 09:19:29 +01:00
cketti 73ab6ba719 Add animated notification icon for "check mail" 2013-02-11 01:31:56 +01:00
Jesse Vincent ed90f3be44 MessageView quick contact badges 2013-02-10 19:02:17 -05:00
Jesse Vincent fd19704fe5 show the date and time in a single view on a single line 2013-02-10 19:02:17 -05:00
Jesse Vincent 648a6eed86 move the To and Cc labels into their own Views; stop playing span games to style them 2013-02-10 19:02:17 -05:00
Jesse Vincent 82a8ac6278 There's no good reason to exclude the Subject from the "full headers" view, especicially since we now play games with it sometimes showing up in the header and sometimes in the titlebar 2013-02-10 19:02:17 -05:00
Jesse Vincent c4b941b9b9 Switch our font sizes to have a "default", which is the size described in the XML.
Unify the text field size setting code. We should put it in a better place
2013-02-10 19:02:17 -05:00
cketti 3a7f1249dc Fix some display issues 2013-02-08 18:04:39 +01:00
cketti b25dfb802d Resize the contact picture bitmaps to the display size 2013-02-08 18:04:38 +01:00
cketti d86dd3a4e7 Add setting for contact pictures to import/export code 2013-02-08 15:41:14 +01:00
cketti c27a5a8104 Add setting to toggle contact pictures 2013-02-08 15:37:28 +01:00
cketti 04ce0a9d3f Add contact pictures to message list 2013-02-08 15:37:27 +01:00
cketti ae5e1af54d Fix settings import/export 2013-02-08 15:24:04 +01:00
m0viefreak c59d70b8c6 Compose: Don't just theme the editboxes, but the whole content (but not the actionbar)
This way also the From: selection, To:, Cc, and Bcc: are themed correctly.
It looks more homogeneous and is consistent with the looks of the MessageView.
2013-02-08 15:24:04 +01:00
Danny Baumann 8f3e61feab Convert theme setting value to an enum. 2013-02-08 15:24:03 +01:00
Danny Baumann bd154c4c0f Allow changing the message composer theme (background and text color). 2013-02-08 15:24:02 +01:00
Danny Baumann 728c1bdabe Remove text selection menu item for JB and higher.
Those versions have text selection support built-in (via long pressing
the WebView).
2013-02-08 15:24:02 +01:00
Danny Baumann 2ea0961006 Move message view theme setting from message view menu to global prefs
by default.

The message view theme isn't something the user is likely to change on a
regular basis, so we don't need to clutter the message view menu with
this setting. The menu item can still be enabled for those who want it.
2013-02-08 15:24:01 +01:00
Jesse Vincent 7714bc3cfa Move "show all headers" into the menu (and out of the UI) 2013-02-07 15:27:22 -05:00
cketti 610af1dfe5 Don't blindly use the saved display mode value 2013-02-06 21:21:13 +01:00
cketti 1244cc864a Make sure onSwitchComplete() is also called when animations are disabled 2013-02-06 21:21:13 +01:00
cketti 0cd7eb12ed Don't call MessageListFragment methods until initialization is complete 2013-02-06 18:11:29 +01:00
cketti 74bbbe7ea5 Fix not marking messages as read on viewing 2013-02-06 17:38:10 +01:00
cketti 07490613b6 Merge pull request #242 from maniac103/fix-sort
Fix sorting of threaded messages.
2013-02-06 08:22:22 -08:00
Danny Baumann 03f9b9ef0d Respect the 'enable animations' pref when animating views. 2013-02-06 10:54:13 +01:00
Danny Baumann 1d849f6664 Fix message view menu items being present after displaying a message and
going back.
2013-02-06 10:43:43 +01:00
Danny Baumann 62ee3bb0d6 Remove useless assignment.
mSavedListState is guaranteed to be null at this point.
2013-02-06 10:43:35 +01:00
cketti 3286cea148 Only remove message view fragment after animation is complete 2013-02-06 00:56:33 +01:00
cketti 473aebefdb Don't show animation when directly opening message view 2013-02-06 00:41:33 +01:00
cketti e59d23ca0e Fix NullPointerException 2013-02-06 00:39:45 +01:00
cketti ac9259a0e3 Restructure MessageHeader to avoid NPE when used by MessageTitleView 2013-02-05 23:55:21 +01:00
cketti 08198d8767 Remove old subject from action bar when loading new message 2013-02-05 23:49:53 +01:00
m0viefreak 1dd697f091 MessageView: fix crash when clicking on URLs in WebView
The ContextThemeWrapper added in a74d57cb71
used getActivity().getApplicationContext() to get the base context.
This is wrong, because an Application context won't work for starting
activities from the WebView.

Instead, use the context that is given to us in the constructor as base
context. This is the one that would also  be used if no ContextThemeWrapper
was present at all.
2013-02-05 23:13:08 +01: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
cketti f5ec5cd3fb Avoid saved state being discarded when message list is modified 2013-02-05 20:00:31 +01:00
cketti cb51da5ea8 Fix restoring instance state of fragment on back stack 2013-02-05 20:00:31 +01:00
cketti 4b920e19b0 Simplify Handler code to restore message list state 2013-02-05 20:00:30 +01:00
cketti 7f39b3c6d8 Fix a potential NullPointerException when rotating the device twice
When MessageListFragment is on the back stack and the device is rotated
the instance state will be restored but no new view will be created. If
the device is rotated again onSaveInstanceState() is called and we have
to take care not to assume that the views have been created.
2013-02-05 20:00:30 +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
Jesse Vincent 69da9bdd7a Only animate the firt view transition if it's from the message list to the message view 2013-02-05 12:18:56 -05:00
Jesse Vincent 3b8421a9a8 Tweak animations to use the (Slightly slower) android default animation speed.
Remove the fadeout to make things look a little less weird
Make the animations slide in from the edge. (See the aforementioned comment about jankyness)

TODO: don't remove the message view until _after_ the animation runs. Before HC, that requires rather a lot more code (writing a whole animationadapter) than it should.

TODO: get the messageview to stop jumping to hide the header area as it's displayed.
2013-02-05 12:04:03 -05:00
Danny Baumann 499e20ef76 Make next/prev buttons track their state again. 2013-02-05 16:11:56 +01:00
Danny Baumann 1dda0cfdbd Another unused import. 2013-02-05 14:32:56 +01:00
Danny Baumann 7b48df7dce Simplify message list item layout. 2013-02-05 11:16:00 +01:00
Danny Baumann f51f675021 Simplify and improve message view header layout.
The star was displayed partially off-screen before.
2013-02-05 11:15:55 +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
m0viefreak 2c87efe5f3 Put back prev/next buttons to non-split message views for now.
Some people prefer them over swiping / volume keys.

They could probably be made optional so they can be hidden.

Also: delete the now unused message_view_fragment.xml and message_view_option.xml.
2013-02-04 19:26:04 +01:00