Break MessageViewFragment up into two fragments, MessageViewFragment, which
is used to show regular messages, and MessageFileViewFragment, which shows
EML messages. (And their base class, MessageViewFragmentBase.)
MessageViewFragmentBase's javadoc has a class diagram.
MessageViewFragment is actually named MessageViewFragment2 at this point
so that GIT correctly finds out the rename from MessageViewFragment to
MessageViewFragmentBase. I'll rename it back in a following CL.
Also added very basic unit tests for MessageView and MessageFileView.
At this point, they just make sure the activities really open and show
messages without exceptions.
I feel like the current naming schema for the activities/fragments is
kinda confusing. Let me know if you come up with better names.
Change-Id: Iff948f4b68cfdb7c1e68f225927b0ce58d34766b
MessageView for regular messages and MessageFileView for EML files.
I'll break down MessageViewFragment too.
Change-Id: Iae66f33d8fb5de58084ab4aef31588e9743c5a18
This version is hybrid of the old design and what Andy's suggested.
- MessageViewFragment is responsible to show a single message at a time.
- Call MVF.openMessage() to tell it to open another message.
No need to re-create a new MVF to do this.
- MessageView manages the message list, and handles "move-to-newer/older"
buttons.
Reason for not re-creating a fragment when opening another message is:
- Re-using the same fragment doesn't make it as complecated/ugly as I
was initially afraid.
It's basically cancelling all running tasks, re-initializee some views,
and load a message.
- We don't have to run MVF.onCreate() over and over again when moving through
messages.
We may change the strategy later, but I think it's suffice for now.
(Changing this might affect how the back key works, so let's revisit it
when the fragment manager supports back.)
Basically this CL is all about internal changes.
No UI should have changed except for:
- Moved "Move to newer/older" buttons to the bottom.
Also fixes:
Bug: 2849129
Change-Id: I00c05069231afded9d98d3d52dd9a7925ebdee9d