Commit Graph

9 Commits

Author SHA1 Message Date
Makoto Onuki d6a2978857 First cut of two pane activity.
How to launch:
- Kick "Email 2 Pane" in the app drawer.

Major known issues:
- When you launches "Email 2 Pane", it starts directly; the logic in Welcom
  won't be executed.
- There's no UI to add accounts.  Use the old UI.
- There's no way to select non-default accounts.
- The on-screen buttons except for older/newer don't work.
- No contex menus work.

Change-Id: I38374acafafbae62e46f84294a7677e54686cfc2
2010-07-21 16:30:52 -07:00
Makoto Onuki 37e21ab968 Don't call setListAdapter until adapter is ready.
ListFragment shows the "Loading..." animation for us until setListAdapter is
first called.  In order to make use of it, setListAdapter should be called
only when the underlying data is ready.

Change-Id: Iac903b1f10ad7ed4be04446ddb2d2172e84bfe16
2010-07-19 17:17:14 -07:00
Makoto Onuki 7daacf83a4 Switch to ListFragment, and use its default layout.
Change-Id: If8dead170a3662cbde87e6ead244363b11db01f6
2010-07-09 13:22:53 -07:00
Dianne Hackborn 7e071d6956 Fix the build -- follow API change.
Change-Id: I7a177a3bbd5b374cfdc2dd708cc8b1acd8c19a92
2010-07-08 16:05:11 -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 8ade2fe010 MessageList: Moved screen transition logic to activity.
- Now open, reply, reply-to, forward are handled by activity.
- Renamed onDelete.  (I was thinking about renaming more methods, but I ditched
  the idea because the current ones aren't that bad.)

Change-Id: Ie88e8cc3c6bd598199cfd9f4cd61d51e8b7023b7
2010-06-22 11:29:36 -07:00
Makoto Onuki 91d47ccb47 Cleaning up MessageListFragment.
- Introduced EmptyCallback to avoid the flood of null checks.

- Fixed some TODOs in MessageListFragment.
  - Notably, sendPendingMessages() is now handled by the fragment itself,
    rather than by the activity.
  - Moved two DB accesss from the UI thread to a worker thread.

- Replaced the 'mailboxid < 0' check with isMagicMailbox(), which is more
  explicit and easier to understand.

- Renamed some methods in preparation of moving to the activity.

Change-Id: Ie730c2c561050bbfa83a38252fcf09d59238f7ea
2010-06-18 10:55:57 -07:00
Makoto Onuki 2aa8ea4399 Use Fragment's context menu API.
Change-Id: I1be6b17ff5bc7fd5258366bc064251c6f79c0cc8
2010-06-14 14:49:02 -07:00
Makoto Onuki 601187db42 Introducing MessageListFragment.
- Extracted MessageListFragment out of the MessageList activity.
- This is basically pure extraction, with the following conceptual change.
  - Now the MessageList activity doesn't know the mailbox id or
    the account id.  If it needs these ids, it needs to ask the fragment.
  - MessageListFragment.LoadMessagesTask tries to determine the account ID
    if it's unknown.

Most code in MessageListFragment is directly copied from MessageList
with minimal changes (e.g. pass mActivity instead of 'this' as a Context).
There's a few cleaning up oppotunities.  I'll work on them later in a separate
CL.

Change-Id: Ie004cc49b429f2cd8f9de73df5abb94f3054ea0a
2010-06-14 10:20:29 -07:00