summaryrefslogtreecommitdiff
path: root/src/com/android/mail/ui/ConversationListCallbacks.java
Commit message (Collapse)AuthorAgeFilesLines
* Peek mode for 2-pane landscapeAndy Huang2014-10-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Peek mode allows CV fragments to be visible but not marked viewed and read. TPC keeps a global flag for whether the current conversation should be peeked vs marked read. I have tried to manually reset the flag in the 6 cases that cause the current conversation to change: 1. tap another conversation (don't peek) 2. swipe to another conversation (don't peek) 3. keyboard-advance to another conversation (peek) 4. auto-advance=newer|older (don't peek) 5. auto-advance=list (go older & peek) 6. empty CV and a list cursor has loaded (peek at i=0) Swipe, in particular, required a new onConversationViewSwitched() call in CPA because onPageSelected() is triggered both when swiping around in the view pager AND when simply setting the initial page as part of constructing a view pager. Thankfully, there is only ever one copy of this peek flag in the app, in TPC, since AAC/TPC is where all the work is done both to mark conversations seen and to switch to new conversations. Rotation to portrait on tablets now requires tearing down a ViewPager; this code and thought process is documented here: http://go/xqaxk TODO: selected indicator for transition from peek->read state in-place TODO: touches in CVF should mark it read Bug: 17291366 Change-Id: I24f71a2b7985773814d8caad9f3ab3fe5c3609c8
* New empty states for tablet landscapeJin Cao2014-09-301-0/+9
| | | | | | | | | | | | | | For tablet landscape, the empty icon should be shown in the CV pane while the empty text (if the folder is empty) should be shown in the list pane. Added a new empty icon for not having any selected conversation, this state does not have text associated with it since the list pane still showed the available items. b/16876067 Change-Id: I27b7b9ae8ce739f23829afc292df083e8399a118
* Keyboard support for focused stateJin Cao2014-09-021-0/+5
| | | | | | | | | | | | | | - remove focusable from FAB so keyboard won't navigate to it. - rename selectionSet to checkedSet - selected is a state for listview to focus one of its elements - what we really want is checked state for checked items in CAB mode. - show the blue focus bar when isSelected returns true - this is auto-set by the framework as we navigate using the keyboard. - remove blue background color for selected state b/17258708 Change-Id: Ic9739c9b349403942f64fafa26500c08d1f1cc4c
* prevent list swipes on 2-pane, part 2Andy Huang2014-08-211-0/+6
| | | | | | | | | Previous CL only worked for the lifetime of a single CLF, so the state reset on account or folder change. Have new CLFs init their state properly. Bug: 17070336 Change-Id: I5208295e6dd2e460fc8b41bec249130708fda713
* [KBNav] Support peeking the focused conversationJin Cao2014-08-081-0/+6
| | | | | | | | | | | | | | | On up/down navigation in two-pane landscape mode we allow for peeking the conversation without marking it as unread. Only on right/enter will the conversation be marked as read. TODO: mCurrentConversationJustPeeking isn't fully implemented yet, so navigating with the keyboard will still mark the conv as read. b/16636060 Change-Id: Id6dbf163d1152c1f1c48836501489aa51478c155
* Remember our scroll position when we return to conv listScott Kennedy2013-08-301-1/+25
| | | | | | | Do this manually until we have a real backstack. Bug: 10533759 Change-Id: Ia97950837aa060d374e0a015eb1ff5db1cc3392d
* Fix some remaining ad teaser issuesScott Kennedy2013-08-191-2/+6
| | | | | | | 1. Disable interaction while in CAB mode Bug: 10212376 Change-Id: I2206ef4336bc9a2538c236479df837caa5724e8c
* Remove ad code.Andrew Sapperstein2013-08-071-1/+0
| | | | Change-Id: I10fb58fd7d4c7e3a51dbf515b0d2df801502648e
* Add new ViewMode.Andrew Sapperstein2013-08-071-0/+1
| | | | | | | Works in OnePaneController. Need to wire up the buttons. Change-Id: Ia9aa5e696cbba1d170038e47d4941cc6fcf0a967
* Clean up a bunch of warningsScott Kennedy2013-06-251-1/+1
| | | | | Bug: 9565838 Change-Id: Ie3a380581e81c63aaa0764875c55bfdccd5f2b13
* Reshow sender image teaser.Andrew Sapperstein2013-06-111-0/+6
| | | | | | | | Fixes b/9375917. Now the sender image teaser shows until cab mode has been entered or it has been swiped away manually. Entering a conversation will not hide the teaser. Change-Id: Ib3c6d56e4504680b513b2b56e9bcbc091a5da8aa
* Many fixes to detached modeVikram Aggarwal2013-01-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | 1. Unselect the top conversation in list (by un-setting activated state), before entering detached mode. 2. Set choice mode to NONE to avoid changes to the selected state in detached mode. 3. Allow for recovering from detached mode by tapping on a valid conversation in the list. 4. Bypass most of the action in CPA.notifyDataSetChanged() in detached mode. 5. Pop out of conversation view if there are no messages (when detached and the detached conversation is expunged). Bug: 8026749 Detached mode triggered even when not detached Bug: 8025487 In detached mode, CPA.notifyDataSetChanged() shouldn't do much Bug: 7337160 Subject and message body mismatch Change-Id: I7b578ab929ee6a7d18002567b1cf4aaac54b0480
* Defer folderlistfragment updates while we are animating.mindyp2012-10-091-0/+5
| | | | | | | | | | | | Part of b/7301434 gmail extremely janky on manta this will have no effect on phones as we never show folderlistfragment at the same time as convlistfragment, so we can never be animating! this will also never trigger unless the user causes an explicit delete of an item, since only that triggers animations. Change-Id: I27cf0542897e364212ea687e2eef9a424a2090a5
* Wait for visible conversation to load before loading othersAndy Huang2012-09-261-0/+12
| | | | | | | | | | | | | | | add conversation load observation APIs to CLC interface save/restore CVF user-visible flag move CVF state restore to ACVF's onCreate start using FragmentRunnable to avoid doing work too early (before ViewPager settles) clean up unused onConversationLoadError codepath fixes undefined conversation load order on rotate improves conversation load speed a (tiny) bit Bug: 6268986 Change-Id: I4670d0c04cb1a36d5aa2c5355e2a79de17d042dd
* fix spurious stopListening on the pager when loading from widgetAndy Huang2012-08-301-0/+6
| | | | | | | | | | | | | | | | When loading from a VIEW intent, the pager was sometimes disconnected from its data source before the data was loaded, which caused it to stay in singleton mode forever. The original code to disconnect the pager was intended to disable pager updates when jumping back from conversation mode in 2-pane (via account spinner), so move that call to the beginning of 2-pane's mode change animation. Also do a bit of misc API cleanup. Bug: 7076780 Change-Id: I508b59816f4f537276aa103b9dcae51972389eb0
* Commit leave behind items when tapping account switchermindyp2012-08-281-0/+6
| | | | | | | | | | | | There is no onclick listener for it or onshow for the spinner popup window this is my best guess as to how to tell when it got tapped when the popup is shown, the dropdown views will be accessed/ built Dismiss when cab mode is exited. part of b/6864248 dismiss leave behind on next action taken Change-Id: Ib706f61a47356412cef73822a4a40453214d22f2
* handle missing messages every which wayAndy Huang2012-08-281-4/+9
| | | | | | | | | | | | | | | | | | | | | | | Entire conversations can disappear upon sync (should pop back) Or just single messages can disappear (should keep conv in view) Handle these specially in conversation view. Stay on the current conversation when possible, except if no messages remain, we should pop back to list view. When single messages disappear, make sure we don't treat all the rest as super-collapsed, or else the conv will render empty. When popping back to list view, we can't call popBackStack() from onLoadFinished(). Since we only need to do this in 1-pane, add logic to 1-pane's showConversation() to handle cases where the caller is in onLoadFinished. In that case, we need to defer the work slightly, but still be aware of other FragmentManager constraints when later handling the deferred job. Bug: 6889742 Bug: 7005366 Change-Id: Id37f878e82523837b7f105d49fb736f774bad224
* save/load conversation state, add granular mark unreadAndy Huang2012-07-231-6/+0
| | | | | | | | | | | | | | | Centralize mark read/unread logic in AAC. Restore some conversation view state upon rotation. Clean up code for star/unstar from conversation view. Move most of that logic to AAC. Move transient conversation state from Message into ConversationMessage subclass. Add new AsyncTask for content provider single or batch requests. We should move to using this instead of AsyncQueryHandler or a raw thread. Bug: 6293711 Change-Id: I907a687ef7ff287fece8c90725dbd204a02485e9
* Major refactor of ConversationCursorPaul Westbrook2012-04-201-0/+6
| | | | | | | | | | | | | * ConversationCursors are now associated with a particular loader; there are no static methods or static state fields * ConversationCursorLoader maintains a list of current loaders (for tracking/debugging) * AbstractActivityController acts as a router of conversation changes to/from fragments (currently message view -> conversation list) * Comment out some ConversationCursor tests for now Change-Id: I9b8425a19c77501796b6681142e1bc0ad20b3693
* conversation pagingAndy Huang2012-04-201-0/+7
| | | | | | | | | | | | | | | | 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
* avoid restartLoader in configuration change sitationsAndy Huang2012-04-171-2/+0
| | | | | | | | | | | | | The ConversationCursor and its loader were being unnecessarily re-initialized on rotation. Only use restartLoader when the folder changes from an existing previous folder, like when you switch folders. Also begin to add an onRestoreInstanceState step, which is very handy for last-second initialization, after initLoader results are re-delivered in the rotation case. Change-Id: Idb39f24cb31f0ccc41379947b047e0af0e615551
* Move ownership of the conversationlistcursor to the controller.Mindy Pereira2012-03-221-0/+5
| | | | | | | | | | | | That way, conversation fragment, conversationlistfragment, and all the controllers can get to it for positioning, getting next/prev conversations, etc. Also removes need to keep conversationlistfragment from being destroyed/ nulled out. todo: should the controller own the list adapter as well so that is can make changes? unclear. Change-Id: I2388b8403c4253f6075c03f613ca73c2cfa81422
* Add conversation view fragment.Mindy Pereira2012-02-151-1/+3
| | | | | | This pulls over the logic that had been in ConversationViewActivity. Change-Id: Ib617d3c1cb43265a559a18e05842ca186188b3d3
* Create ConversationListFragmentVikram Aggarwal2012-01-301-0/+30
The ConversationListFragment does not do much right now, but the framework is in place. Next steps will include showing the conversation list and allowing for conversation selection and the Contextual Action Bar. Change-Id: I130bb77a93bd4f58b189cb6ce47adc9e09f8e6ae