Go to file
Makoto Onuki 02fa70aa18 Refactoring MessageListXL
I always thought our Activities are way too fat, meaning we've put too many
things into activities without any structure.

The major problems with this are:
- They have too many fields, which are not final and not even orthogonal.
  This makes them very hard to understand/maintain.  Changing one tiny bit
  can always cause unanticipated side-effects.
- Very hard, or almost impossible to test.

I really think we should break them into independent and self-contained
subcomponents which can be tested separately.

Introducing MessageListXLStateManager, which manages the current account,
mailbox and message, and show/hide/update fragments accordingly
for MessageListXL.

With this class, MessageListXL will be able to switch accounts/mailboxes/
messages by just calling the methods such as selectAccount(), without
worrying about when to show/hide what fragment and how to initialize them.
(In other words, MessageListXLStateManager encapsulates the two-pane screen
transition.  It's not intended to be reused for the phone UI.)

I didn't make it a nested class in MessageListXL, because nested classes can't
have real private members (private member are accessible from outer classes and
even brother classes!!), and I wanted it to be really self-contained anyway.

Change-Id: I1c121e99e30f12cc118e1c35abc9b30f49939a4a
2010-07-27 15:10:54 -07:00
assets auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
docs auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
images auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
res Merge "Renaming message_view_header.xml to message_view_fragment.xml" 2010-07-22 10:33:12 -07:00
src Refactoring MessageListXL 2010-07-27 15:10:54 -07:00
tests Use AccountManager for POP/IMAP; refactor setup classes 2010-07-21 19:01:41 -07:00
.classpath Initial Contribution 2008-10-21 07:00:00 -07:00
.project Initial Contribution 2008-10-21 07:00:00 -07:00
Android.mk add filter for emma code coverage 2010-06-17 11:25:07 -07:00
AndroidManifest.xml Use AccountManager for POP/IMAP; refactor setup classes 2010-07-21 19:01:41 -07:00
CleanSpec.mk Add an empty CleanSpec.mk 2010-03-08 18:05:00 -08:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
NOTICE auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
proguard.flags Tests for IMAP FETCH 2010-05-18 10:48:11 -07:00
remove-exchange-support.sh Remove exchange readme and update script 2010-02-04 13:09:34 -08:00