summaryrefslogtreecommitdiff
path: root/src/com/android/mail/ui/ActivityController.java
Commit message (Collapse)AuthorAgeFilesLines
* Revert "UnifiedEmail: Supported Email search function"Danny Baumann2016-12-301-17/+1
| | | | | | This reverts commit ad4f76791d5306f6046150cefd7de07d9d15aa33. Change-Id: I396973b7f27a5df483a7845b16b1db804bb8916b
* UnifiedEmail: Supported Email search functionweitan2016-08-241-1/+17
| | | | | | | | | | | | | | | | | | | 1. Use the search function to search the local mail. 2. Search results interface: Filters All, Subject, Sender, Receiver click on the different filter, and search the corresponding results. All for the default selection filter. 3. Search results interface: slide switch filter, remove "sliding removing a single mail" effect. 4. Search results interface: alternative condition, slide switch filter, cancel the multiselect state. 5. Search results interface: UI-filters layout, sliding effect, search, according to the number of search results highlighted. Change-Id: I2af40a386de55e221878bd346cda3ea1cff8f2fa CRs-Fixed: 1023498
* Peek mode for 2-pane landscapeAndy Huang2014-10-151-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fade in/out the search barJin Cao2014-10-131-1/+3
| | | | | | | | | | | | | | | | When showing/hiding the search bar, fade it in/out instead of simply setting the visibility. Other changes: - remove the check for state change inside showSearchActionBar because we previously assumed that a given state will always look the same. However, this is no longer true as ONLY_ACTIONBAR looks different on tablet landscape verses portrait (landscape shows the transparent background while portrait always shows the white search bar). b/17546831 Change-Id: I9120afd3ff89a4c6611b3b4510c2d8427285f3d8
* [Quantum search] new two-pane land search result listJin Cao2014-09-171-1/+1
| | | | | | | | | | In two-pane landscape, change the search bar accordingly when we are in conversation mode (so the menu items are visible). b/17361017 Change-Id: Icb07fff91f0533681478d866430fbaa82bc5850c
* Keyboard support for focused stateJin Cao2014-09-021-1/+1
| | | | | | | | | | | | | | - 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
* remove drag/drop codeAndy Huang2014-08-281-21/+0
| | | | | Bug: 17322937 Change-Id: Idc21156e6d5e9ea4e83e3c17e92a66388ffc7a6a
* Merge "Add custom view for toolbar to reposition search icon" into ↵Jin Cao2014-08-251-0/+13
|\ | | | | | | ub-gmail-ur14-dev
| * Add custom view for toolbar to reposition search iconJin Cao2014-08-251-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Remove search from the default menu items and add the search button to a custom view so we can position it ourselves. This involved extending the toolbar class because custom views cover up the toolbar title by default. b/17070560 Change-Id: Iba7d127a58b8061d84228732fcadbd82665d0835
* | Remove some unnecessary interfaceJin Cao2014-08-251-46/+1
|/ | | | | | | | | Remove unused interface for ActivityController and ControllableActivity. b/17258810 Change-Id: I8edbff09b1a5a3278efad8675e3fc3f71e82d2e4
* Search last-minute updates before dogfood!Jin Cao2014-08-211-1/+1
| | | | | | | | | | Scrim transparency should be 20% instead of 50%. move requestFocus to inside hasFocus block. Fix back button navigation. b/16518233 Change-Id: I66f3e7deb81dda3959ed05e0661c4ff13786f495
* Quantum search - version 1Jin Cao2014-08-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I apologize in advance for this huge CL. - New icons (yay!) - Abandon framework search and handle in-app search functionality ourselves. This is made possible because we use Toolbar and can position any custom view on top. - Remove all previous search related attributes, including search providers, searchable, search authority, default search menu item layout, etc. - Cleaned up the recent history provider to contain only the functionalities we need - query, add, and delete. Instead of using the framework to add recent queries, we directly insert into our database. Since the provider no longer needs to extend ContentProvider, removed some unnecessary callbacks such as onCreate. - Custom quantum search views: - Top search bar, this is inserted in a FrameLayout on top of Toolbar. The search bar interacts with the suggestion list and AbstractActivityController via the QuantumSearchViewController interface. - Suggestions list, this is inserted in the FrameLayout that typically contains the main content pane for either one-pane or two-pane layouts. Again, this interacts with the action bar via the controller. - Voice search, this is simply an implicit intent that converts speech to text. b/16518233 Change-Id: I589c40e6c6e3d8c719856b735d0c53e8db986e65
* [KBNav] two-pane landscape navigation polishJin Cao2014-08-111-1/+1
| | | | | | | | | | | | | | | | | | | 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
* Revert "Revert "Megadrawer" until b/16637856 is fixed."Andrew Sapperstein2014-08-041-2/+5
| | | | | | | | Want this to be ready when the bug is fixed. This reverts commit c53c887101aa90b5024af635823023aa801e075f. Change-Id: Ice73a0f48cbe1e949fde3db3719ee86995778ebb
* Revert "Megadrawer" until b/16637856 is fixed.Andrew Sapperstein2014-07-281-5/+2
| | | | | | This reverts commit d4bb2af4a545493b88e900be5262329c715dd38a. Change-Id: I3c8860d30cde8b70c135c2ef457f5f601b45b8b5
* MegadrawerTony Mantler2014-07-281-2/+5
| | | | | | b/16458862 Change-Id: I476ee21209e8108fc77e3d265326347a53f13ef5
* Rearrange MailActivity layout loadingTony Mantler2014-07-221-0/+7
| | | | | | | | | Need to load the layout earlier so that we can access a Toolbar instance within the layout itself as the action bar b/16458862 Change-Id: Iba187bb1495fe343a78598355586e1b5253452a2
* Implement support for help libraryRay Chen2014-06-241-2/+1
| | | | | | | | | | | b/12068507 Primary changes: * Merge help and feedback as requested by the new guideline * Determine help context by the view mode (list or conversation) Change-Id: I6d9d7cc56063e7eedfe6db18c2c363e9b4d07cef
* add floaty footer to the drawerAndy Huang2014-03-181-0/+2
| | | | | | | | | | | | | | | | | | | | * settings now moved to drawer * swapped out footer assets to match sectioned inbox icons (TODO: even newer assets) * tweaked footer misc to match mocks * split out the drawer list's scrollbars a la conversation view * disable floaty footer on short screens (e.g. landscape phone) * move AAC's drawer-related APIs from Account Controller into DrawerController and expose more, like raw access to drawer state * drawer is now white, footer is gray (expansive tablet unchanged) * align footer items with sectioned inbox items * only activate the footer items after closing the drawer (smoother, better fit for Feedback) TODO: tweak animations, especially when scrolled near the bottom Bug: 11061485 Change-Id: I3e70d994934c846061efbfb8d118604a965d344f
* Ads in conversation listScott Kennedy2013-07-291-1/+1
| | | | Change-Id: I3095409211d6a6bdc42212bcd6a330333a9da411
* Fist cut of nested foldersVikram Aggarwal2013-06-071-2/+2
| | | | | | | | | | | | | | | | | | | | | 1. Rename FolderListFragment.FolderListSelectionListener to FolderSelector. 2. Allow special views to be tapped; all existing special views disallow taps. 3. Allow nested folders in ConversationListFragment. The adapter is responsible for populating the nested folders above the conversations. 4. Add a nested folder special item for the conversation list. This reuses current resources and is particularly ugly. The ugliness will be fixed once we have a UX spec and real assets. 5. The child folders are loaded through an ObjectCursorLoader in the ConversationListFragment. Change-Id: I5eb566d7a1f87c1a11fc6961378d00650a27007d
* Copious documentationVikram Aggarwal2013-06-041-0/+17
| | | | | | Documentation on usage of loaders close to the source of the action. Change-Id: I6562950d781dbab3ba00f7d921eeae88ed64f610
* Show/hide menu items based on drawer open/close.Andrew Sapperstein2013-05-131-0/+7
| | | | | | | | | | Fixes b/8905351. Currently, when the drawer is fully opened, we hide the action items except send feedback, settings, and help. We only show the other action items when the drawer is fully closed. Change-Id: Ifdded1ccd20f012fb6b69089ee3914a399ea8235
* Support pressing title to toggle drawerPaul Westbrook2013-04-241-0/+6
| | | | | Bug: 8521542 Change-Id: I920a54f5ea69a8f839c0134a6fc274b0645e157c
* Use the ActionBarDrawerTogglePaul Westbrook2013-04-211-0/+11
| | | | | Bug: 8668887 Change-Id: I1efbee696aa46fa6d1226f7e23793dbfdbcbdddb
* Remove the subject from the actionbarVikram Aggarwal2013-04-081-5/+0
| | | | | | | | | | | | | | Following the new UX guidelines: no subject in actionbar anymore. Bug: 8438223 Subject of the mail disappears from the action bar on orientation change to landscape mode Bug: 8492928 Action bar title switches between subject and the folder+account name Bug: 8529168 Remove search_actionbar_view Change-Id: I8551fdacd7843ca0b2ba0bf1025483eee2587638
* CleanupScott Kennedy2013-04-051-2/+0
| | | | Change-Id: Iee8abf75639450d469632e43fe0e102b687558db
* Reset the FLF arguments when the account changes.Vikram Aggarwal2013-03-251-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier we were creating a new FLF every time an account changes. We aren't doing that anymore so we need to change the arguments when the account changes. Changes: 1. Decouple the folder list URI from fragment creation. 2. Instead, always read the folder list URI from the current account. 3. No point saving it or restoring it from bundles. 4. Implement AccountController in the FolderSelectionActivity to pass the current account when creating widgets/shortcuts. ...and minor changes: 1. controller.loadFolderList() is only called from OnePane, so making that private 2. Removing the folder list URI as an instance variable since that is now unrelated to the creation of the account. Bug: 8437457 Mismatch of personal/corp account Change-Id: I81170ee80b5f9e064fd13edbc23981171740d814
* Remove unused interface and rename methodVikram Aggarwal2013-03-131-2/+1
| | | | | | | | changeAccount(account) is more indicative of its purpose than onAccountChanged(account) which suggests that the account has *already* been changed. Change-Id: I7dd780e16b6a238814748bb429113dfe1069d9aa
* Loaders that create objects in the backgroundVikram Aggarwal2013-03-111-1/+1
| | | | | | | | | | Create Folder objects in the background. This frees the UI thread after onLoadFinished is called, since the object has already been created. Bug: 8315641 optimize AbstractActivityController's loaders Change-Id: I1f4b2f679cf99a9193d88cb6b9a5aa77b33d6ea9
* Drawer support prototypeRohan Shah2013-03-081-2/+3
| | | | | | | | | Added drawer in the stead of the folder list selection. Drawer works as expected, by swiping from the left and following up with the drag. The show labels item has changed functionality - toggling drawer state. Change-Id: I34efc865c95696911d8cdf96e83a4334816378a0
* fix search hard key handlingAndy Huang2013-03-041-2/+2
| | | | | | | | | onSearchRequested(String) -> executeSearch(String) No sense getting this confused with the very-different Activity.onSearchRequested(). Bug: 8309831 Change-Id: I20dfaa854d6dfb1b8a774337ae2ae1b0db17abce
* Single-message zoom using a floating WebViewAndy Huang2013-02-161-1/+1
| | | | | | | | | | | | | | | | 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
* No need to override methodVikram Aggarwal2013-01-171-5/+0
| | | | | | ConversationListCallbacks.isAnimating has the exact same signature. Change-Id: I0613b3f9ff5ced9d73af2292282cc239853a143d
* Make up icon work consistently for recent & label listVikram Aggarwal2012-11-051-6/+0
| | | | | | | | Fixed two problems with the up icon. Removed the visibility of the resetActionBar() method and removed code duplication. Bug: 7419208 Up arrow next to app icon isn't updated in two cases Change-Id: I0b166bfe9984eb4f5ce0370d1c0abbb036fab93d
* Reduce visibility of methodsVikram Aggarwal2012-10-221-10/+0
| | | | Change-Id: Icb0d2698debfcecb440477a6125d8981b8e68bfb
* Add comment to isAnimating api.mindyp2012-10-091-0/+3
| | | | Change-Id: I00002fd9aba0fb7bc76a83b7cb3cd22c960c76ea
* Defer folderlistfragment updates while we are animating.mindyp2012-10-091-0/+2
| | | | | | | | | | | | 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
* only get content description when accessibility is enabled.mindyp2012-09-281-0/+5
| | | | | | | | | | Getting the date is the most expensive part of the bind operation takes ConversationItemView.bind from ~5ms to .5ms bind is called whenever we get a list item view, so its important that its FAST Part of b/7188066 Gmail inbox list fling is jankier comparing to previous release Change-Id: If789382df6429f61ac80c4be08611c5391da5618
* Wait for visible conversation to load before loading othersAndy Huang2012-09-261-5/+0
| | | | | | | | | | | | | | | 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
* Add loading animations to conversation viewmindyp2012-09-091-0/+5
| | | | | | | | | | | | | | 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
* Folder list fragment by sections.Vikram Aggarwal2012-08-311-1/+2
| | | | | | | | | | Known issue: the recent folder *and* the user folder is highlighted when selecting a recent folder. A change is being prepared to fix this. Fix b/7074104 Change-Id: I82733bc6be105c6270d17f3c1a281fd4ec15a48a
* Less invalidateOptionsMenu()Vikram Aggarwal2012-08-301-1/+0
| | | | | | | | | | | | 1. setAccount() and switchAccount() already call invalidation, so remove calls just after those two. 2. Settings changes do not change the back button, so don't reset the action bar button when settings change. Discussed in b/6946182 Change-Id: I1b8e8d0caf1b20f33ee33c2dd59114597e767de8
* fix spurious stopListening on the pager when loading from widgetAndy Huang2012-08-301-6/+0
| | | | | | | | | | | | | | | | 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
* handle missing messages every which wayAndy Huang2012-08-281-8/+5
| | | | | | | | | | | | | | | | | | | | | | | 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
* Restore drag/drop logicmindyp2012-08-221-0/+10
| | | | | | fixes b/7034633 Drag functionality is missing on tablets Change-Id: I8d0c9d4a95cf143a307fb093721f3b5f6eba872c
* Move ConversationListFooterView click handlingPaul Westbrook2012-08-201-1/+2
| | | | | | | | Since the click handling for the ConversationListFooterView is essentially the same as that of the ToastBar, move click handling into the Activity Controller Change-Id: I14b8ef6788b929e82d61b8393195b703c210021d
* Prevent use of disabled ConversationCursorsPaul Westbrook2012-08-161-1/+2
| | | | | | | | | | 1) Change ConversationPositionTracker to get the ref to the ConversationCursor from the AbstractActivityController 2) Make sure to notify the position tracker about changes to the cursor in onLoadFinished Bug: 6994143 Change-Id: I1d1e38852bb6cec1bc254b099c52f04bbe3af99d
* Get the Account through a listenerVikram Aggarwal2012-08-141-8/+1
| | | | | | | | | | Every object that needs an account gets it from the ActivityController by registering for future updates. This should reduce some of the headaches with account objects going out of sync. Fix b/6969950 Change-Id: I0449b482ecd84bdb947304db5f0504c77dd1dc7a
* Refresh cursor even when scrollingPaul Westbrook2012-08-101-2/+6
| | | | | | | | | | | This allows the "Loading..." item to appear before the user stops scrolling the list. If the the live data is populated before the user hits the end of the list the user will not see the "Loading..." item Bug: 6966755 Change-Id: I902eb442e47a6efb99b850a559106c81acac19c0