02fa70aa18
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 |
||
---|---|---|
assets | ||
docs | ||
images | ||
res | ||
src | ||
tests | ||
.classpath | ||
.project | ||
Android.mk | ||
AndroidManifest.xml | ||
CleanSpec.mk | ||
MODULE_LICENSE_APACHE2 | ||
NOTICE | ||
proguard.flags | ||
remove-exchange-support.sh |