Commit Graph

41 Commits

Author SHA1 Message Date
Mindy Pereira d6decef1d2 Make search interaction match gmail.
shows results list in portrait on tablet.
shows split in landscape on portrait.

Since email currently has no concept of saving the currently
selected message on orientation changes, there are some issues changing orientation
and restoring to the correct search state.

fixes coming in the next cl.
Change-Id: Ib0b98c4018c2ae0fabc2c78dfce4d3a197837d4f
2012-05-01 11:11:01 -07:00
Mindy Pereira e4202e782c Make message items aware of the various modes.
On two pane tablet in portrait mode, the message list items may not
be wide enough to be considered "WIDE_MODE", however, when they are shown
in the message list mode, they should ALWAYS use message list mode backgrounds.

Fixes b/5641014 email portrait: missing the vertical divider between folders and messages

Change-Id: Ied05386f1ab62c48b1824647c95a6f72baabc859
2011-11-18 09:26:49 -08:00
Ben Komalo 513486cfb5 Fix per account starred mailboxes.
We always switched to combined view when we tapped "Starred" in a
mailbox list. This was confusing since tapping to show the mailbox list
will take you to the mailbox list for the combined view, even if there's
only one account on the device! Other confusing things happened like
showing coloured account chips, even if there's only one account.

This fixes it so that we pass the account ID when building the
selection. Lots of wiring to make it happen, but very little change
overall.

Bug: 5388326
Change-Id: I1fe52f211cceca0c1b26581e200f3c7adcd0734a
2011-10-12 19:44:39 -07:00
Marc Blank b9b6ce1d36 Don't show -1 as a search result count
* We'll show zero in this case

Bug: 5361745
Change-Id: Id969fa9895520382de11a47a302792d3431e451c
2011-09-23 11:19:47 -07:00
Ben Komalo 217dc144bd Fix issue where subject stays bolded when read.
Bug: 5145057
Change-Id: I8ac88b219b2a2b84faf2707805b57eca5c960c80
2011-08-10 16:01:06 -07:00
Ben Komalo 2313f48bdc Minor visual fixes in message list
- changed activated font to white
- ensure activated bg is set even for wide (as it shows for a split
  second when you select a message right before the slide animation)
- attempt to make the animation not so abrupt

Bug: 5110992
Change-Id: Ie05e0a6a09afb97155b26d28672d4a2fb79cc563
2011-08-02 15:19:10 -07:00
Jorge Lugo 8e779e627a Accessibility improvements
TalkBack functions properly with MessageList items, as well as
"reply," "reply-all," and "forward" buttons while viewing messages.
It is now also possible to switch accounts using only a dpad
or trackball. Finally, EditText fields in account setup also work
with TalkBack now.

Checkmarks don't work with Talkback, but this I have confirmed and
reported it as frameworks bug.

Change-Id: I7f72682a517eef4fa122241c675026fe7997ac64
2011-07-15 09:08:13 -07:00
Marc Blank 4c0e5c0d0a Remove unneeded (and harmful) test in MessagesAdapter
* This fixes the case in which messages are being loaded upon
  initial sync, but do NOT appear in the message list (at least
  until leaving and re-entering the app/mailbox)
* The problem was that MessagesAdapter was checking the state
  of the HOLDS_MAIL flag, which might not have been set at the
  time the Inbox was created; it turns out that the check is
  not necessary, so we remove it here

Bug: 5008696
Change-Id: I009ddf7d82d938758b99c855dfd0271596c5248a
2011-07-12 16:49:48 -07:00
Jorge Lugo e2f6f18396 Added "replied to" and "forwarded" icons in message list
When a message has been replied to or forwarded by the user in
Exchange or IMAP, it now displays the appropriate symbol in the
message list view. (Right now it's just a test image based on the
reply/forward/replyall images until the assets come in.)

Bug: 4313491
Change-Id: I525e55179d62b6ab08df37cb9bfe9fdd9fefb908
2011-07-01 14:43:17 -07:00
Ben Komalo 659f60f734 Wire through logic for searched mailbox
- update hint based on the mailbox being searched
- ensure that we use the original searched mailbox as the mailbox to
search for subsequent search (i.e. a search while we're viewing search
results) and not the search mailbox

Change-Id: Ic8663272173ce386dcd13fdf0369e918fb895be8
2011-06-29 14:09:14 -07:00
Ben Komalo 1f6acaf396 Hide footer when we hit the end of a search
Change-Id: Iec082a9f9560819c034f91706229b1efb7303ba2
2011-06-28 17:24:54 -07:00
Ben Komalo 6b256f1fa1 Wire through results count in search header.
Change-Id: I817236d9c3294acb25b62724cc8c99d47df7f354
2011-06-28 17:11:16 -07:00
Ben Komalo 37c8a70d64 Introduce a SearchCursorLoader
This loader will abstract away the waiting for the controller to cleanup
the existing contents of the search mailbox

After some additional, to-be-done plumbing, I'd like
Controller.searchMessages to return some results info (like # of results
at the least) so that the SearchCursor returned can relay that
information to the client (which can then do a lot more interesting
things at that point).

Change-Id: Ifcba0ddf7170c56dac9f3b44128988a5aa4ca887
2011-06-27 15:43:21 -07:00
Marc Blank f5418f1f93 Move Account into its own top-level class
Change-Id: Ide7c991b7d4d418dbe17164421425bf898ba64ee
2011-06-13 15:37:22 -07:00
Makoto Onuki 41878c2813 Use the CursorWithExtras pattern for the message list.
This will make the message list a lot snappier.

We were using two different loaders for the message list; one is to load
the meta information and the other to load the actual message list.

Unify them using the CursorWithExtras pattern.

Change-Id: I02957bbca1b1fb74ca6eca14ad2535dfdbf03a5a
2011-06-06 16:34:03 -07:00
Makoto Onuki 7cb2376aed MessageListFragment: Preparing to use back stack
with some clean-ups.

Change-Id: Ifd0ce888c6387013bc51237528980605c929279c
2011-05-26 16:22:11 -07:00
Makoto Onuki 4c4e4c3515 Clean up the method to build message list selection.
- Moved the method to EmailCommon.
- Use *_SELECTION for magic mailboxes
  (meaning we now use subqueries for magic mailbox selections, rather than
   building the mailbox ID list by ourselves)

Change-Id: I3ebf6af62fd912fea6faea0f75e05fc61c87af3b
2011-05-16 11:08:05 -07:00
Ben Komalo 53ea83ebf9 Move Mailbox to top level class.
No other changes made.

Change-Id: I3d8f3c521dc0d902be313b25252b4b6a4a96e7ee
2011-05-13 17:42:02 -07:00
Makoto Onuki bfac9f2e8a Move some of the log constants from Email to Logging
Change-Id: If9f4e4e3adcdef897a0d6a4e153bb446a8b24fdd
2011-05-13 14:24:38 -07:00
Makoto Onuki e5b7f27fdd Fix combined view crash
Bug 4351392

Change-Id: I839d66a13df949f469afa7f10138026f6b463ad6
2011-04-27 15:52:26 -07:00
Todd Kennedy 019341af98 Set mailbox flags for message contents
For IMAP, it's possible for a mailbox to exist on the server, but, to be
unselectable. Previously, these folders were never added to the folder list.
However, with nested folder support, we need to have these folders in the
UX so the user can get to its sub-folders (which may be selectable).

Change-Id: I11135fafbb14b40660983804fb86bd223e180d5e
2011-04-27 09:10:30 -07:00
Ben Komalo 2577842269 Misc fixes and dead code removal.
Change-Id: I48b2fa5f7bf619197d882c71e8b174d31d130e26
2011-04-11 14:01:01 -07:00
Marc Blank 78684ccc79 Temporary search UI
Change-Id: Ia138ca93f0b28fd0915aa79c965f752f7c08ee90
2011-04-06 08:51:14 -07:00
Marc Blank 31d9acbf06 Email split, part huit: Refactor constants, clean emailcommon
* There are three pieces to this CL (sorry):
  1) Move and/or rename some constants into emailcommon
  2) Move Utility to emailcommon, moving the few UI
     related utilities back into Email (FolderProperties
     and UiUtilities)
  3) Remove all references to resources from emailcommon
* The three pieces relate in that, between them, they allow
  the emailcommon static library to compile cleanly

Bug: 3442973

Change-Id: Ic5e3abaa2a1b36999e0b6653c6c2134ea1bd544f
2011-02-14 12:18:10 -08:00
Marc Blank a7bc0319a7 Email split, part six: EmailContent
* Moved EmailContent to emailcommon

Change-Id: Ib3db1bfcfe74554c0e5afd3cfce6d72f26e9aeb9
2011-02-10 19:44:29 -08:00
Makoto Onuki 80a2e9109d Remove STOPSHIPs regarding CloseTraceCursorWrapper
The loader crash seems to have been gone.

Bug 3335072
Bug 3335067

Change-Id: Iefc5367e6e394840687b0c2c4f6b75f8e9661d26
2011-01-18 10:04:14 -08:00
Makoto Onuki adbb6f8bc4 Log cursor/adapter class name and such when detecting a crash
Also log where the cursor was closed, if it is.

To investigate bug 3308465 and bug 3305706

Change-Id: I2b0fd9ea14757b6cf7597cd7162686d050d43fe9
2010-12-23 16:15:44 -08:00
Marc Blank 06a2f4a3b1 New message list formatting per pixel perfects
* Need icon assets (attachment, meeting, star on/off, and
  checkbox on/off)

Change-Id: I6780fb354584ce5ea398b555a8485cf600617586
2010-12-13 15:32:05 -08:00
Marc Blank 6e8d964faa Make sure snippet is never null
Bug: 3241603
Change-Id: I5ef35e041b70e72005204ac242b46b5747617b87
2010-12-01 15:41:16 -08:00
Makoto Onuki 5b81690de1 Show color chips for combined view.
Show color chips for account rows and message items on the combined view.

Moved hard-coded color values to resource.

Bug 3138001

Change-Id: Ib93fb9d6e9592ebd0c297f83c3dee2358a80508f
2010-11-23 13:03:06 -08:00
Marc Blank 937ea4fc87 Initial rewrite of MessageListItem for XL
* Drawing all done by MessageListItem, based on view width
* Completely functional, layout tweaks required

TODO: Consider caching drawing values for performance

Bug: 3137994

Change-Id: Ie3de79357bfe976b2fcebdedb71dea011252b445
2010-11-17 12:23:03 -08:00
Makoto Onuki 60c6dc4711 Sparse message list item layout for XL
- Tested on N1 as well
- Also fixes bug 2546662 -- show both invitation & attachment icons

Change-Id: Ic2f42370be32a0beb43f9018cefdce86028e8189
2010-10-07 10:17:58 -07:00
Makoto Onuki 4209ea36b0 Make ThrottlingCursorLoader smarter
Now the class initially uses smaller timeout, and expand it when detecting
multiple changes in a short period.

This CL makes the UI look more responsive especially on the message list +
message view mode.  e.g. Starring on the message view will quickly be
reflected to the message list.

Bug 3024799
Bug 3027832

Change-Id: Ie2d44c3769d43e3fd0f54ee526556eb3bad5e288
2010-09-22 18:01:01 -07:00
Makoto Onuki 58843f0dc3 Highlight selected message on message list
Also make sure the highlighted mailbox is always visible on the mailbox list.

MessageListFragment now just uses the default background color, which means
it no longer changes background color for unread messages or checked messages.
This should be re-implemented if necessary with the newer wireframe.

Change-Id: I9bfbe9f0711ea4ab56be27778b00298d3033123b
2010-09-22 14:44:23 -07:00
Marc Blank 9e9113b9b8 Fix MessageList formatting bug when subject is empty
Change-Id: Ia2ab247935a4882a308fb393f5484bfe3ea10d86
2010-09-10 14:21:52 -07:00
Makoto Onuki 7183724276 Don't check flagLoaded for outbox message list
We found a case where messages in outbox have flagLoaded=FLAG_LOADED_UNLOADED,
where it should be FLAG_LOADED_COMPLETE.  Haven't found the root problem, but
remove the flagLoaded test to mitigate the problem.

Also moved the buildMailboxIdSelection call to a worker thread.
(this method issues some queries.)

Bug 2984285

Change-Id: I2a5be300fb3da703698512262cc38bea75d0f7ba
2010-09-10 11:12:46 -07:00
Marc Blank e7b9e4ab94 Add snippets to messages
* Add 'snippet' column in Message table and handle upgrades to the
  new schema
* Generate a snippet from either HTML or plain-text message body,
  removing tags, extraneous whitespace, and other superfluous text
  along the way.  Store the snippet in the Message table
* Clean up MessagesAdapter to use the pre-existing list projection
  and constants
* Write unit tests for snippet creation
* The UI in this CL is always single-line, ellipsized

TODO: Handle two-line subject if portrait and XL

Change-Id: I84a2cbe10957975942edad6eb1255a726924a78a
2010-09-03 23:23:19 -07:00
Makoto Onuki bdf84d57e6 Revive checkboxes to select messages on MessageList
It's basically a partial revert of I3cb6c45c, with some clean-ups.

Also removed mHandler, which was unused.

Bug 2949762

Change-Id: Ib4e673c5829b99ba45fec449bffb62df84555a01
2010-08-27 13:39:06 -07:00
Makoto Onuki 187d033484 Reworking MessageListFragment.
- Now MessageListFragment uses loaders to load data.

- Now that we use Loader's auto-requery with throttling,
  removed the throttling timer from MessagesAdapter.

- Simplified footer mode.  (now only "no footer" or "load more")

- Removed saving/restoring list state code.
  These method don't really look like working, or at least
  not always working.  Now that UI's lifecycle is changing,
  we'd better redo it from scratch.

- Removed MessageListUnitTests.
  It only has tests for onSaveInstanceState/restore of the fragment,
  which I virtually disabled.

And minor clean-ups
- Moved the code to save/restore selected state from the fragment
  to Adapter.

Bug 2911766
Bug 2897500

Change-Id: I16c7aefecc5409c57fc5fc8c59b5c80d9b7fc164
2010-08-12 15:06:37 -07:00
Makoto Onuki 91093ee6e8 MessageList: Introducing "selection mode".
- Long-press an item to go into the selection mode.
- In the selection mode, tap items to toggle selected/non-selected.

This also means:
- No checkboxes any more.
- No context menu any more.

Color scheme hasn't been updated yet, so it looks a bit ugly for now.

Change-Id: I3cb6c45c1dc5461a234c9e9ab9e038c90a9fe8b2
2010-06-23 16:23:41 -07:00
Makoto Onuki 851f3219e2 Renaming MessageListAdapter to MessagesAdapter
in line with MailboxesAdapter.

Change-Id: I4ed387db2f5ce1f9bad282521c62eeec0c697db4
2010-06-09 14:43:43 -07:00