History log of /packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9e700c59ccd35fb243fbfa207b530d4184d7ad3a 09-Oct-2014 Andrew Sapperstein <asapperstein@google.com> More logging for b/17662578.

Change-Id: Ic6a9e6c75609b2a7cf92b0f0a10f0d562e73a869
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
1e191e34733699149a9e662fd2540ae4b6ec9b0d 04-Oct-2014 Andrew Sapperstein <asapperstein@google.com> Logging to help diagnose b/17662578.

My guess is that ConversationContainer.getHeight() is sometimes
wrong. I want to see what the height is when we attempt to move
the view offscreen. Also what the measured height is.

Change-Id: Ic321d9b96737ab2ca26e021a2a5767c5898d6d67
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
2cb6c1ca2b508331ee29d16b71f5ec024cd22555 18-Sep-2014 Jin Cao <jinyan@google.com> More keyboard polish

- Weird condition where user presses right to go into a conversation,
we load the conversation then set mConversationToShow = null. But
then our posted runnable for "peeking" the conversation completes,
and we show a null conversation which defaults to the first conv.

- Don't focus if the pager can't find anything to focus. This prevents
the focus from being put to default location (top left) if
onRequestFocusInDescendants fail.

- When the user taps a conversation, the list loses selectedItem. Use
checked item as fallback for navigation. However, sometimes the
listview loses focus when the user taps a conversation, thus
it wont receive any onKey events. I'll try to figure that out later.

- Check target size before commiting the undo action for toast bar.

b/17570560
b/17567978

Change-Id: I3d471dc1c1d956957463198086112d5a352fb775
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
eed2850edd2c0c3f339d5e84a09d1385c2cdd256 11-Sep-2014 Jin Cao <jinyan@google.com> NPE in ConversationContainer

If we want to focus the conversationcontainer but the
adapter isn't set up, default to the system's handling.

b/17455499

Change-Id: I905f39bcecb5c5b2e5050fc9459c9ae72455b4ea
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
2c15529ceb22e7aaad6f75ef809cb908ea08b286 24-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Actually remove bottom border. Fixes b/17227986.

Change-Id: I8df817c94be3821d7bf6adab4d0841ae58eb3afe
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
c966a8a65a75559f677574c2a53cb9d43490f04e 22-Aug-2014 Jin Cao <jinyan@google.com> Focusing on the conversation pager grabs wrong initial focus

When the framework tries to shift focus from the listview
to the conversation pane, it calls onRequestFocusInDescendants.
By default, this method will find the first child that is focusable
and call requestFocus on that child.

This won't work for ConversationContainer because we add the
children view in reverse order. As a result, it always tries
to focus the conversation footer first.

Override onRequestFocusInDescendants to always auto focus
the first header item fixes this issue.

In ConversationViewAdapter, we also prevent views that
are recycled from grabbing focus with up/down navigation.

This CL also contains a ClassCastException bug fix for
ConversationListFragment$onKey.

b/17189775 b/17113398 b/17162145

Change-Id: I739207178fe3df1087d6504fffb11bfdf854a5dc
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
24e052ad62145bfcb1189817e750e78b60c8645d 21-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Don't remove additional bottom border in draw.

Fixes b/15771956. This was the one case we missed.
We were removing the additional bottom border during our
draw loop. Now, like all other adds and removes, we post
the removal.

Change-Id: Id6c65c8a4695e6dd973dee02a91a5c274bec0fa7
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
7ee90b37599cb6717782d40a6d085849918c29df 14-Aug-2014 Jin Cao <jinyan@google.com> Keyboard polish

Some polish for our custom conversation view navigation,
e.g. pressing up when you are on the first header item
will auto focus the overlay, same thing for down and last
item.

Disable focus for conversation header since there isn't
much actionable items there (MAYBE star, can discuss later).

b/3304236

Change-Id: I06796adac09716bccdae2636c7a9da245896eb34
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
0b69338a45faa422ccba8faf64c9816c55d33e4a 11-Aug-2014 Jin Cao <jinyan@google.com> [KBNav] two-pane landscape navigation polish

The system default navigation doesn't work quite as well
in landscape mode (e.g. focus on conversation view's reply,
hitting up goes to the mini-drawer instead of the message
header). This is partly because our overlay views are not
in a real list, thus we can't take advantage of the framework's
navigation support for listviews.

I decided to roll my own navigation entirely for
conversation view and manually focus/scroll.

This CL also includes some polishes for interactions in landscape
mode between drawer, TL, and CV panes.

b/16636060

Change-Id: Id1de01439a118702756d52f6a8b3f02395a0f932
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
a7404589b03ac9dd0d07b3f7d0a1ec92ac9acb62 05-Aug-2014 Jin Cao <jinyan@google.com> [KBNav CV] basic support for CV keyboard nav

Support basic navigation via keyboard in CV.

b/16636060

Change-Id: I66dbcd8015d722244b57c4e24579d0d854d3ee74
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
f8e065aab2cbff4dee86cc931a4d9c88dec37345 06-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Disable snap headers for SCV.

Change-Id: I69666b72d94bdb70f997f6324c69db27ccf152fc
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
84872d07eb0247a14c1e883e12f5ad642488fc96 04-Jul-2014 Andrew Sapperstein <asapperstein@google.com> Turn off snap headers :( b/15595931

Change-Id: I05a3cd6d4757faca31e6d191b588e81c3ad3490c
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
e2a30e19a9fff0e4368c4ec36280a3fcd4ca03e2 03-Jul-2014 Andrew Sapperstein <asapperstein@google.com> conversation footer b/15595931

Change-Id: I9eda1060f4e49a0448a321f603aec0a254daf86a
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
59ccec3db4710f2aea6a4a9a30160ad19331367d 19-Jun-2014 Andrew Sapperstein <asapperstein@google.com> Remove borders/cards from conversation view.

b/15595931

Change-Id: I51b5ce1d9387d6354d421b0e399a2003c6e84c54
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
07fe9320d65d33b0d99b580eb47c5859ee7a7be6 23-May-2014 Andrew Sapperstein <asapperstein@google.com> Fix NPE. b/15163241.

Change-Id: I1b8358470b5bbbb0e423268f8757f2413a743471
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
b5cfdb21796667ca2b98774ff47cfd16b501c6f7 23-Apr-2014 Andrew Sapperstein <asapperstein@google.com> am 381c322e: Save to drive promo. b/7659807.

* commit '381c322eb30c39f63a2bb82812d63262eb3c1c1c':
Save to drive promo. b/7659807.
381c322eb30c39f63a2bb82812d63262eb3c1c1c 20-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Save to drive promo. b/7659807.

Provides a space above the attachment bars to show
some additional content. Default behavior does nothing.
Hooks have been added to allow resizing of the message
footer.

Change-Id: Ib950091d176311bdb06c7c7a466223beb997a7b5
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
d97eb8738785fd5488417098c361633721dfdb19 17-Apr-2014 Andrew Sapperstein <asapperstein@google.com> DO NOT MERGE Revert "Prevent flickering. Fixes b/10994303."

This reverts commit bb6f0504c1607c89d9a3dd3e6023f36d61837016.

Change-Id: I834c3f2a2ebf89108d67ef497bfd52b1234e55cd
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
040b52fe85a67eeb6d9a4e9dc20322ee36ad4aec 17-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Revert "Speculative fix for b/13772061."

This reverts commit 0cf8a191dc00081c2ef3256c6d18a143404544fc.
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
0cf8a191dc00081c2ef3256c6d18a143404544fc 09-Apr-2014 Andrew Sapperstein <asapperstein@google.com> DO NOT MERGE Speculative fix for b/13772061.

Posts requestLayout and invalidate instead
of just calling postInvalidate(). Only posts
if postAddView is true.

Change-Id: I27c58ed059d7af231b277975634e41ae1572de74
(cherry picked from commit 0744489dd3c80c56b9eded95ae027b7089cbf5a3)
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
2fd167d6131482da984768b5ee75cefa32ed3e32 28-Jan-2014 Andrew Sapperstein <asapperstein@google.com> RTL - conversation view fixes.

b/12681840 - Properly align attachment details.
b/12681242 - Message header expanded details are locale aligned.
b/12681528 - Message header title and snippet are locale aligned.
b/11989230 - Set each overlay view's layout direction.

The first three bugs were fixed by adding unicode wrapping
to a bunch of fields.

The final bug was slightly more complex. In some scenarios,
the overlay views's layout direction was not properly resolved.
But it should always be the same as its parent so we forcibly
do it now when adding new views.

Change-Id: I9e065e0deaf1958ee87d098231238f6d976e9e68
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
bb6f0504c1607c89d9a3dd3e6023f36d61837016 31-Oct-2013 Andrew Sapperstein <asapperstein@google.com> Prevent flickering. Fixes b/10994303.

The problem was that we were calling positionOverlays
from onScrollChanged in WebView which is called during
draw. Since positionOverlays adds views, this is broken.
Two manifestations of it were flickering message headers
during flings and flickering of the drop shadow for the
snap header.

To fix the flickering (which was really not drawing for
a frame), we have slightly changed the recycling behavior
of ConversationContainer. Instead of adding and removing
views, we just move them offscreen (where they're no
longer drawn) until they're needed again. If we don't
have a recycled view, we will still add the views
(via a post) but we don't ever remove when a view is
scrolled off anymore.

Additionally, we stop overriding dispatchDraw to forcibly
draw the topmost overlay. This resulted in flickering of the
snap header gradient because it would be drawn sometimes twice
and sometimes once. We no longer need to since we don't
add or remove views during draw anymore.

Change-Id: I937a4cc67f04ed005439c1fab2103287a986148d
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
a467d40eeb9c598fc6d7cb2dbafa2a331292d23e 16-Oct-2013 Andrew Sapperstein <asapperstein@google.com> Clean up SnapHeader interface & remove ad border.

b/11132059

Change-Id: I509263f27fe904353cd608989c173510a2ef1462
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
85ea6188b3c62ede2eb0427379f050717f79562c 15-Oct-2013 Andrew Sapperstein <asapperstein@google.com> Abstracted out snap headers for ads UI refresh.

b/11132059
Rather than directly including the snap header
in conversation_view, we inflate it at runtime
via an override-able method in ConversationViewFragment.

Change-Id: Icaec39f6461313a894eef5506448b3f7513df044
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
83b460bf42d48bd8ab18ee135fab181242d13b9a 24-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Fix b/10456377.

Use WebView.getContentHeight() to compute the
additional bottom border rather than the container's
height which never actually expands.

Change-Id: Ifad68a93043ec50e75720bc53e57d830cd2abdf9
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
ef6367d9ec71fc5022a06c4f87504637a010a0b7 05-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Conversation View UI Refresh: Fake Bottom border.

Now using the actual bottom value of the final overlay
item to position the fake bottom border instead of the
speculative value coming from the web view.

Fixes b/10128257.

Change-Id: I4d67444c4b816f55229a16fd95c67228e2bea98a
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
888388c1485fd8c694abacb638fb54273c5f411b 02-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Conversation View UI Refresh: bottom borders.

Bottom borders now extend to the end of the screen.
There is one small temporary hack that I will fix for
real tomorrow where there's a difference of 2 pixels.
For now, we cheat since the extended border can bleed
into the real border by a few pixels with no real problem.

Change-Id: I1ccfbfe3fd1eca30be1c8eb5928649dd5f1a6619
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
cee3c90574b48ccaa0f8b9f9341383c231ed41d2 31-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Conversation UI Visual Refresh: border fixes.

Borders now expand and collapsed based upon the state
of the messages above and below them. Also fixed a bug
where replying to a message added an additional border.

Change-Id: Ia90caf4ea595767a90213fe33b29e1bd75c0aca0
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
14f937408fe2451a91b44d3cd7d141347e716775 25-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Conversation View UI Refresh: Cards.

Lots of changes:
New show pictures asset.
Added border as a new view type in the conversation
view to vertically separate cards. Changing its size
is TBD.
Final UI for details header (both collapsed and
expanded).
Side borders are accomplished via a new overlay layer that
is positions a view to each side of the conversation view.
Lots of dimension changes, padding and margin changes, and
other pixelpushing.

Change-Id: I4029ae46896e27fe20b005c01b8df04bb2a46c2a
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
ff8553f20964f4c31b0c503a9e1daff6ae08a9c7 06-Apr-2013 Scott Kennedy <skennedy@google.com> Cleanup

Change-Id: Iee8abf75639450d469632e43fe0e102b687558db
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
c1fb9a9c2730178105977fca629e80951bfc3cdc 11-Feb-2013 Andy Huang <ath@google.com> Single-message zoom using a floating WebView

Protected by an experimental pref for now
Restores scroll position
Preserves 'show pics' state
Speedy animation
Fade-in animation begins right after onNewPicture (ICS compatible!)
add UpOrBackController role for fragments to get a whack at back/up

And because this approach avoids using the CSS 'zoom' attribute
within single-message mode, double-tap works well and there are no
line-height issues.

Bug: 7400516
Change-Id: Idedfa6e35edc291c9169fbd9b1315b39b4253f60
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
8f1877832b0f3bc55e6d63ccf70dfae7dd8328c9 07-Nov-2012 Andy Huang <ath@google.com> wire up snap headers pref

Have conversation view read the initial value upon view creation
and update the value in ConversationContainer via dataset
change, which is triggered by account change (which is triggered
by settings change!).

Bug: 7217360
Change-Id: I55ac947dea692af6ad32995d0970c69dbdf5c2ef
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
4baafcbb39e20a81a1585270fc270a560ec8824d 02-Nov-2012 Andy Huang <ath@google.com> add sanity checks when updating snap header in-place

If snap index points to a collapsed header, mSnapHeader will be
unbound. It's invalid to ask the snap header to refresh in this
state, so only refresh if it is bound to an affected item.

In practice, this really doesn't happen much, because you'd
have to send a message, collapse it, then scroll down far enough
(perhaps you send another message) so the sending collapsed
header intersects the scroll top.

Prevent header view rendering on null for good measure.

Bug: 7459484
Change-Id: I3bf4af97102a0f6b1af5405ffdac72f26e5c7620
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
6b3d0d9ab407c3d8b6bcb73bddbfd23f2513bb83 30-Oct-2012 Andy Huang <ath@google.com> update header sending status in-place (more so)

Previously, an in-place header update avoided a WebView
re-render, but did re-render all overlays. This is normally
imperceptible, but thumbnail views flicker as they are rendered.

Since only a couple of overlay views are truly affected by
sender updates, update those views in-place when they are
present. This is only supported on MessageHeaderViews for now.

Bug: 7434748
Change-Id: Ifdebea1410dadfceefae52d406891b5383e9ab15
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
2a1e8e30bdd02dc08bdf2f878201b279f60d5142 24-Oct-2012 Andy Huang <ath@google.com> show "Sending..." in an outgoing message header until sent

It mostly just wasn't wired up to Message.isSending.

CVF.processInPlaceUpdates() now looks for sending state changes
and causes affected overlays to re-render.

"Sending..." changes also apply to the snap header, so I
improved how data changes generally propagate to the snap
header. Instead of manually prodding the snap header upon a
change, fix it so dataset changes on the adapter also unbind
the snap header view (to stay consistent w/ non-snap views).
The positioning pass that immediately follows will re-render it.

Bug: 7229688
Change-Id: I72930bfa7ec20788c3e4de67f4b6856a7e6a0bf7
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
9be59911221b236b10c7575e407ac587c9231bc7 19-Oct-2012 Andy Huang <ath@google.com> clean up debugging code from b/6946182

Change-Id: Ic6605e5e0fc7ba555801c7c11f5cdd2141047541
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
adbf3e8cadb66666f307352b72537fbac57b916f 13-Oct-2012 Andy Huang <ath@google.com> toggle normalization & zoom on/off

and wire it all up to a pref that re-renders upon change.

separately, make a few improvements to whitespace management
when zoomed in with normalized mode:
* place attachment overlays at the top of their regions
* place overlays above the first expanded message at the top of
the conversation, instead of the usual position just above the
message.
* impose a max zoom factor to limit excessive spacer whitespace

Bug: 7312540
Change-Id: Iae3afff0ee81e4ba9367568e884a041780b24ebf
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
c69cee309fb61e071ecae11e72bf2b8621eeb872 08-Oct-2012 Andy Huang <ath@google.com> don't use ViewGroup.detach/attach

ConversationContainer was misusing ViewGroup's detach/attach API
by holding onto detached views in the scrap heaps for an
arbitrarily long time, rather than re-attaching within the same
draw frame.

Switch to always use the regular ViewGroup add/remove API, which
is slower, but not enough to make a difference here.

Bug: 7299364
Change-Id: I59e15d4e4912b9d38a56b7243c1809d380ef5074
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
0a648c9b8f9d02f89e8711e97215b0e30f2cf0b6 02-Oct-2012 Andy Huang <ath@google.com> Apply snap header overlap as layout offset, not draw offset

Using a homebrewed draw transformation alone doesn't transform
event dispatching. Oops.

Bug: 7256664
Change-Id: I2404e3b965e5291990beaf1d3e67957b4a8f104e
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
6d15a75aac7dd468ed94a97f324f6920d89cf28d 03-Oct-2012 Mark Wei <markwei@google.com> Prevent Gmail attachment preview tiles from covering mail content.

Fixed tablet-specific bug where margins were messing with width measurements.

Bug: 7258969
Change-Id: Id4632e607ae58434d42f186789393f5a377de56c
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
3bcf180f8104bc27319086a9a6ece5a3c2917c37 09-Sep-2012 mindyp <mindyp@google.com> Add loading animations to conversation view

fixes b/6272925 jank - conversation loading isn't animated
fixes b/7131797 Blank scren shown for live conversation, when in airplane mode
Note: need to do a next cl that puts off showing the spinner
until at least XXX ms have passed
Also, we cant use the software layer for rendering like we did
in gmail1
it looks like there is a skia crash that triggers when we try
to use software / switch to hardware rendering for the browser
need to investigate that more

Change-Id: I96a30b700c3e88d52e603fe2f11b44d113e013d2
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
8fdce82be7c643375470cd6dc48ff531f9175dd0 28-Aug-2012 Andy Huang <ath@google.com> fix scrap view reference loss that caused native crash

When re-rendering an existing conversation view, the part of the
measure process that uses scrap views inadvertently removed them
from the scrap heap without first calling removeDetachedView().
This made the views eligible for GC, and if a GC occurred before
the next draw, ultimately led to a native crash.

Fix this by NOT removing scrap views during the measure phase.

Bug: 6905156
Change-Id: I7ea4b2ec48ce683cbbf0d40247ae5040c777854b
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
256b35c0a8287f48c28e0d1ba3fae65790063295 23-Aug-2012 Andy Huang <ath@google.com> add margins to conversation view

Also fix some left/right balance problems on wide messages.

Bug: 6336075
Bug: 6375007
Change-Id: I8fd4a3099d0670f68295bf8f28d2ba55e7177bdc
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
7517e3b61b898a57f19be0671f70d58a82224643 20-Aug-2012 Andy Huang <ath@google.com> Turn on Andy's most excellent copious logging of layouts

When the 'MailBlankFragment' logging is enabled, this will disable all
hacky workarounds and log view state. When a blank view happens, look
for logging with this tag to see where the view state might have
messed up.

With the 'MailBlankFragment' tag disabled, this removes all logging
and enables the hacky workaround to patch-up view layout requested
state.

Bug: 6946182
Change-Id: Ia4c2515f969be29678dc0a9bd1c11d487e3d1520
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
28b7aee7fa1f7d096d33fc823a88a64f7a3fa79d 21-Aug-2012 Andy Huang <ath@google.com> update conversation view on reply-all setting change

Use existing adapter's dataset change signal-- dump overlays
and re-render.
Begin to assume that Settings always hangs off Account.

Bug: 6245217
Change-Id: I70f98f641eee6d193f9842a578a889197f650941
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
31c38a8247b4583ac1cc506acf8454d8922ee491 16-Aug-2012 Andy Huang <ath@google.com> animate snap header away

Change-Id: I8978cb80bd7a6c0f637a240c8b4137e5c7e61528
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
59e0b18db1bd06cfb74693d7dbb0cb48112a69b1 14-Aug-2012 Andy Huang <ath@google.com> snap headers

Low-speed obscuring of snap header not yet implemented.

Change-Id: I23bcf61a8de6d9d719d40a6b65009c7711ef0e19
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
47aa9c991b33c722a6ba1946fc02e0aba17bc1c9 01-Aug-2012 Andy Huang <ath@google.com> "new message from" in conversation view on update

* put the New Message bar in a new floaty layer in
ConversationContainer. snap header can also live here.
* add left/right margin support to ConversationContainer

Send/save of a new message also generates the 'new message'
notification for now.

Bug: 6384217
Change-Id: I10a40bbf87423194214e5ded08539abaaf7fd25c
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
7f9ef60c5e42470814f6b4bb8ed771c17fdfea22 26-Jul-2012 Andy Huang <ath@google.com> quiet conversation logging

Change-Id: Idcd3f72c096294b5d45eeca0c01930b860d047c8
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
23014705ca9872cd5004a1aa76e83ae260165eca 09-Jul-2012 Andy Huang <ath@google.com> better handling of wide message content

Don't hide horizontal overflow, so content in extra-wide
messages is scrollable. (Downside is that an initial swipe on
such conversations will scroll the content rather than going to
ViewPager.)

Use default WebView text layout algorithm (NARROW_COLUMNS). It
doesn't kick in by default, possibly because of the method we
use to shrink wide messages, but at least double-tap after a
manual zoom-in will trigger line re-wrapping.

NARROW_COLUMNS reflow can change the HTML height, so we need to
remeasure and reposition headers when that happens. Added code
to listen for WebView mContentHeight changes. This is done
circuitously (via invalidate()) because I don't know of a more
natural way to to know when this happens. Although invalidate()
happens all the time, this should be pretty cheap because no
work is done unless the DOM height changes.

Clean up screen-pixel -> HTML-pixel conversion code. This will
be handy when trying to make the page initially wide to further
improve line wrapping behavior and reduce the frequency of
the extra-wide case. Initial-wide-mode presents a host of
side effects to be addressed in a future CL.

Bug: 6389819
Bug: 6318848

Change-Id: I3ad2bd1ca6c1f6c0859af1a10056578ea4faf073
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
e20e1639ff0eca873e9986ec52dbaa497059e01e 16-Jun-2012 Andy Huang <ath@google.com> guard against NPEs

monkeys can trigger events at funny times.

Bug: 6675993
Bug: 6676065
Change-Id: Iaa0a844a87fe42e38d9f4c88968cecdc2a69b713
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
8778a8717b21335ebc3127b7be1a2cddf6b64697 21-Apr-2012 Andy Huang <ath@google.com> re-draw conversation attachment views on changes

Suppressing all overlay child layout requests may have been too
extreme, as it also prevented view state changes on buttons and
other views in attachment rows from reflecting their new sizing
and drawing their updated state.

Bug: 6315886
Bug: 6336986
Bug: 6375652
Change-Id: Ia5f9cda8743515ede35f3dfb154c7052acae5b47
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
632721e6b3a9ba8c476456f2e0fb1b564561e0b5 12-Apr-2012 Andy Huang <ath@google.com> conversation paging

This CL takes the approach of using a permanent ViewPager that
pages through conversation fragments. Its adapter is only
set and populated when the conversation view is shown. In all
other cases, it is an inert empty layer.

One risk with this approach is that it breaks with the typical
fragment transitions that all other content panes use.

On the other hand: conversation fragments are full-on fragments
and benefit from loader separation, and the FragmentManager
takes care of save/restore of state.

Change-Id: Ic17d1ae3f35a0cb1119967f2d34433ad27fa307c
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
46dfba6160b55a582b344328067e3dafeb881dd9 19-Apr-2012 Andy Huang <ath@google.com> super-collapsed blocks

Expanding a block inserts HTML for all bodies in that block, as
was done in ICS. This could be improved to be more lazy.

The block's layout has a mostly useless wrapper for the 1px
bottom white padding, because ConversationContainer does not yet
support margins on child overlays.

The overlay container now listens to adapter changes, which
was necessary to update on super-collapsed expansion. This
should also fix crashes and strange layouts on draft deletion.

Also fixed monkey NPE on url click while I was in there.

Bug: 6325429
Bug: 6260673
Bug: 6258859

Change-Id: I77347b58bbec49b4b5b58a2b3de7e5e9f291ca9c
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
65fe28fa88daad08f3be4c084ca5b4eaa366d1a7 07-Apr-2012 Andy Huang <ath@google.com> optimize low-hanging fruit found using traceview

* View.getTag/setTag is a slow way of finding an overlay view;
switch to a SparseArray
* this also obsoletes mChildrenToRemove since we can immediately
remove overlays from the SparseArray
* bring back the Email Address cache to avoid repeated parsing
* avoid repeatedly calling findViewById for each header
* cache expensive timestamps and recipient summary strings

Change-Id: Ic76265848e4956a28a44c4a2e3e726ec9ef6bfaf
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
9875bb4fc00347fc76f432a6e9ec5e6987679ca9 05-Apr-2012 Andy Huang <ath@google.com> remeasure when overlay views change size

The initial measure() (for sending to WebView) is done too soon,
so after a height change, ensure that the container re-measures.
The container will only measure newly bound views, or views with
newly changed heights, so most scrolling continues to not
trigger measure().

It would be more correct to mark the overlay *view* itself
valid or invalid, not the item, but apps don't have access to
the measurement flags on View.

Also do lots of cleanup in the area of measure/layout of the
Container. Prevent children of the container from requesting
layout because they don't push on each other in the normal way.
(a followup onGeometryChange is needed to re-position properly)
But a layout triggered from elsewhere should re-measure and
re-position the container's overlays.

Bug: 6297423

Change-Id: Id9196322774e732417e926ac87ce2ec524bf425e
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
c7543579c6a97c0ae3341578332f56d4d226f34c 04-Apr-2012 Andy Huang <ath@google.com> support message header collapsing

* toggle header collapse/expand
* initially render read messages collapsed
* collapse removes attachments footer and stops loader
* expand creates/reuses attachments footer, but ONLY if visible
* can (mostly) expand/collapse details
* can expand/collapse quoted text
* add lots of logging (disabled during scrolling!) to catch
strange layouts

Change-Id: I73f533c91d24ef1c05919d0a3b396f276898107a
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
7bdc3750454efe59617b7df945eadd7e59bee954 26-Mar-2012 Andy Huang <ath@google.com> building blocks for bottom-aligned attachments

Attachment overlays now warrant their own adapter entries,
because they are no longer attached to each message header.

So since cursor items no longer map 1:1 to adapter items, add a
new specialized adapter to house different kinds of scrolling
overlay views. This support is also needed for super-collapsed
blocks.

The adapter is also an ideal place to store transient render
state like 'expanded' and 'show pics', as each ConversationItem
can manage its own state instead of having the fragment do it.
And view recycling requires that the adapter remember item
state as you scroll around anyway.

Next CL will actually separate attachment views and logic out
of MessageHeaderView.

Change-Id: Ibc589915f01ada0d9a41d8968a0ee63be6030449
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
120ea66184c31bdeb729274054ec913afe3872c1 28-Mar-2012 Andy Huang <ath@google.com> broaden scale rejection to ignore all scales until a touch event

Inline image onload events also trigger a scroll change
(because the page becomes larger), so we can't just ignore the
first scale reading. So now ignore all scale readings until the
first thing that can actually *change* the scale-- a touch
event.

Bug: 6218921
Change-Id: I03476ca8c67a0d997ce067e74fc97612ffca4187
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
07f8732dcc0e411d0b26d9eb88de582f95aaebb6 28-Mar-2012 Andy Huang <ath@google.com> work around webview scale bug

Seems that on Prime and Xoom, the initial return value of
getScale() when measured at the moment the WebView's scroll
position is first determined can be quite wrong. (We heavily
rely on this value to place headers as you zoom.) So ignore
the very first report of this value.

Bug: 6218921
Change-Id: I581773204ce61d2a5601396a23f896e6ec631588
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
8dab59bffdf74353fcd9a25c6cbe380ac6c64562 21-Mar-2012 Andy Huang <ath@google.com> don't forget to measure the conversation header

Change-Id: I4dd57b8551cee4d5ff68c72997bd9888c97770d0
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
3233bff8ae08a56543c9f5abf1bc6ab38f0574ce 21-Mar-2012 Andy Huang <ath@google.com> hook up 'show pictures' button

Add 'show pictures' button for messages where the provider
claims it embeds external resources. In Gmail, this is true when
a message contains external image hotlinks. Inline image
attachments are not yet handled.

'always show' tells the provider to whitelist the message sender
to allow images in the future (works with Gmail provider).

Change-Id: I1b174d8fad9da481ec305caff06d109f9d215093
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java
5ff63747a1b5c6e2197528972cbc3ba808b09d8d 17-Mar-2012 Andy Huang <ath@google.com> show subject and labels in conversation view

Show labels only for accounts that support multi-folder
conversations.
Move some classes into smaller 'browse' package.
Special-case subject/labels overlay for now. Full adapterization
is coming soon when super-collapsed blocks are in.

Change-Id: I458009776eb2e3840dd9e441de9e4ead3cc94d0b
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationContainer.java