summaryrefslogtreecommitdiff
path: root/src/com/android/mail/ui/OnePaneController.java
Commit message (Collapse)AuthorAgeFilesLines
* Revert "UnifiedEmail: Supported Email search function"Danny Baumann2016-12-301-9/+22
| | | | | | This reverts commit ad4f76791d5306f6046150cefd7de07d9d15aa33. Change-Id: I396973b7f27a5df483a7845b16b1db804bb8916b
* UnifiedEmail: Supported Email search functionweitan2016-08-241-22/+9
| | | | | | | | | | | | | | | | | | | 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-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | | | | | 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
* Fix TL flicker before CV shows upon opening notificationRohan Shah2014-10-031-3/+9
| | | | | | | | | Pager no longer animates in unless we've selected a conversation from the TL (In all other cases, it will now directly appear). Bug: 17808571 Change-Id: Iadabdfa6ec913b1f5f9979dfe50c74eaeb51d326
* Merge "Do not show compose button in ad view" into ub-gmail-ur14-devRay Chen2014-10-021-0/+4
|\
| * Do not show compose button in ad viewRay Chen2014-09-261-0/+4
| | | | | | | | | | | | b/17631902 Change-Id: I15965a91971e565b9934b4635c6b6bc96b1cac2a
* | Add fade in transition from TL to CVRohan Shah2014-10-011-19/+39
|/ | | | | | | | | | | | | | | | Added a fade in animation for the conversation pager to ease in the transition from TL to CV and allow for feedback on the TL. In OPC, wait to remove TL fragment until after the pager is done animating in (Also addressed edge cases such as the user hitting back rapidly after selecting an email or, in the case of long animation durations, multiple actions occuring - did this by checking view mode in the listener and cancelling animation on pager hide). Bug: 17304654 Change-Id: I24e977eb6bd335f4f6764fef58b549e7cf0edfe3
* Expand drawer to be under status bar. b/17569398Andrew Sapperstein2014-09-181-0/+1
| | | | Change-Id: I345095c4679f83a315bb3d5909b9d2d7fbece111
* [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
* Update "New message" toast bar in CVJames Lemieux2014-09-031-3/+4
| | | | | | | | | | | | | | b/17373672 The bar in conversation view prompting the user to update the thread with newly arrived messages has been changed to use the ActionableToastBar to look consistent with conventional snackbar messages. In two pane layout it is now possible to have a conventional snackbar message showing over the TL and "new message" snackbar showing over the CV simultaneously. All snackbar messages have had their trailing punctuation (period) removed. Change-Id: Iaf7d5d9afc38360d07a7b6602d6bc5626ecc3de2
* 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
* Merge "Add custom view for toolbar to reposition search icon" into ↵Jin Cao2014-08-251-0/+11
|\ | | | | | | ub-gmail-ur14-dev
| * Add custom view for toolbar to reposition search iconJin Cao2014-08-251-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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-3/+2
|/ | | | | | | | | 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/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+13
| | | | | | | | | | | | | | | | | | | 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
* [KBNav] Support peeking the focused conversationJin Cao2014-08-081-0/+5
| | | | | | | | | | | | | | | 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
* Add popup and push down animations to snackbar.James Lemieux2014-08-071-5/+10
| | | | Change-Id: Iaed07d606b2c5973ddcc4aea20c6a61f2fb1adb2
* Merge "Support "deleting" in outbox" into ub-gmail-ur14-devJin Cao2014-08-011-0/+1
|\
| * Support "deleting" in outboxJin Cao2014-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | - Allow only failed items in Outbox to be swiped away/deleted. - Same applies for multi-selection. - "Deleting" in Outbox means remove the outbox label from the failed message and applying the drafts label. This needs to be implemented by both Gmail and Email providers. - Added new ConversationOperation for this new action. b/4080109 Change-Id: Ia9c8e386c7c65693f72fda85a49cb6a1b7d1fec1
* | mini-drawer. new tablet UI.Andy Huang2014-08-011-0/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | New MiniDrawerView class for a minimized drawer UI with shortcuts to the main drawer logic to switch accounts and folders. The "drawer" is now always visible except in portrait conversation view. Can't easily use an actual DrawerLayout because: -drawers usually occlude other views, they don't push -we have that omnipresent 'mini' version -we want custom control over dragging to trigger a fancy animation (not just edge swipe!) (I'll revisit this later.) Even ActionBarDrawerToggle alone can't be used w/o DrawerLayout, so for now, all of this drawer logic (dragging not yet implemented) is from scratch. TwoPaneLayout no longer "shifts" its panes to transition from TL->CV in landscape; the panes are now fixed in position. Not yet implemented is a 'conversation-visible-but-not-marked-read' state necessary to avoid the initial gray expanse there right now. Bug: 16147175 Change-Id: I021aaff15afebb76db6722265e2a592213674405
* Quantify Snackbars (aka Undo bars)James Lemieux2014-07-301-4/+0
| | | | | | | | | | | | | | | b/15991901 This CL addresses the major layout and styling changes introduced by the Material theming. Note that layout is influenced by all of the following factors: 1) RTL or LTR 2) Action text may exist or not 3) Description text may wrap or not 4) One-pane vs. Two-pane Change-Id: Ie69bca2cef39666a90c9a43d6b4b030c64e664c8
* Rearrange MailActivity layout loadingTony Mantler2014-07-221-1/+6
| | | | | | | | | 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
* Refactor how the warm welcome is triggered.Régis Décamps2014-06-261-3/+5
| | | | | | | | | | | | - The welcome tour is an independent activity. AbstractActivityController doesn't need a specific ViewMode (this should also fix b/15747390) and doesn't implement WelcomeTourCompletionListener anymore. - MailActivity returns the warm welcome loader callback. - The MailActivityEmail, FolderSelectionActivity don't implement onWelcomeTourRequested anymore. - ControllableActivty implements WelcomeTourListener. - OnePaneController and TwoPaneController transition to the inbox as they used to. - WelcomeTourListener renamed onWelcomeTourComplete to onWelcomeTourFinished and returns a status (completed, discarded, or not shown). b/15705426 Change-Id: I9af1f7c2ee5a5819d5df2d860547a2668f1d5cf6
* Changes to support displaying a welcome tour.Greg Bullock2014-06-161-13/+11
| | | | Change-Id: Ice10fd8d629a9f4aebe5cfb7cb94bc1eb5ebaaeb
* Properly check for empty UriJin Cao2014-05-291-2/+1
| | | | | | | | | | Uri == Uri.empty doesn't work. Changed all uses of Uri == Uri.empty to Uri.empty.equals(Uri). Refactored the function into a helper function inside Folder to check if a given folder is top level. b/14987117 Change-Id: I22b7a0bf7fbfcbd14936e5ff9b428fd3f4c15e60
* am b0b74c3e: Fix some accessibility issuesMartin Hibdon2014-04-161-0/+3
|\ | | | | | | | | * commit 'b0b74c3e3e5eac1d8aa9132ca59bcf2a9cafe691': Fix some accessibility issues
| * Fix some accessibility issuesMartin Hibdon2014-04-161-0/+3
| | | | | | | | | | | | | | | | | | | | b/14075074 Make the individual TextViews in the message details focusable so that they can be navigated. Also, set the title of the drawer so that it will be vocalized when opening the drawer. Change-Id: Ic0ad0e7c5adebabce4d8135b69595062e9ac47c2
* | Added support for arbitrary post-undo actionsJin Cao2014-04-101-2/+2
|/ | | | | | | | | | | | | | | | | - Added interface to add arbitrary callbacks after a specific undo action occurred. This is useful if we want to do some specific UI modification after an undo, show the user more information, etc. - This callback is also added to DestructiveAction so all destructive actions can run custom callback when it's undone. - Used the interface to add show the removed conversation when auto advance is active. - Removed references of inLoaderCallbacks in AbstractActivityController where it's not being used. Demo video here: https://drive.google.com/a/google.com/file/d/0ByX6TliQlkICSjZub0ZyaWtxS0pmZk1kbk5WQ2V5SGlMTWxF/edit?usp=sharing b/6769311 Change-Id: I00cc66421315091cc934e0f63188ff693b0a84b8
* Move Help & feedback to Nav drawer of Email.James Lemieux2014-03-131-1/+2
| | | | | | | | | | | | | | | | | | | b/11061485 Gmail remains unchanged due to this checkin. HELP and SEND FEEDBACK are now the two bottom-most drawer items in the Navigation drawer of the Email application when it is present or in the overflow menu when it is not present. SEND FEEDBACK still behaves as always. HELP has been redesigned so that it displays the help content in a local webview rather than using an external browser in the Email application. Change-Id: If1bdba26ac2caca79c81205a409c67659cd49653
* small refactorAndy Huang2014-02-261-2/+1
| | | | | | wet -> dry Change-Id: Iccb44b3156d5a38d6f3d0ddfee5b8d21f00c98cd
* Make drawer available in Search and ConversationViewMartin Hibdon2014-02-261-0/+13
| | | | | | | | | | | | | | | b/8737446 This is more complicated to do correctly than it seems like it should be: When we are viewing search results, there is actually a separate activity instance on top of the main conversation list activity. This is true for both one and two pane layouts. So now, when we launch the search activity, we do it with startActivityForResult. If the result is set upon return, then the parent activity will know to navigate to a different folder or account. Change-Id: I5b780c4ce5bb0a1e55364cc4df280346900c5df5
* Fix memory leak in FragmentManager backstack.Mark Wei2013-09-041-1/+0
| | | | | Bug: 10604786 Change-Id: I6785512c926e47a101e7e628ef0e37a0c31c5f52
* Revert "Revert "Fix hierarchical folders""Alice Yang2013-09-041-149/+16
| | | | | | This reverts commit 6e604d33ee0aab10a72c836af6e83ace315f4b79. Change-Id: I8eb30a3b38919e0efb694fc571b166a89258f517
* Revert "Fix hierarchical folders"Alice Yang2013-09-031-16/+149
| | | | | | | | Temporarily so we can take TOT UR10 This reverts commit ad41814e704f0e7575472e4e7b60dfaf68b2f3b1. Change-Id: I70f7b3b424c3da3785181c673c7c4f80737892aa
* Fix hierarchical foldersScott Kennedy2013-08-261-149/+16
| | | | | | | | | | | | | Stop adding stuff to the back stack, because we never remove it. Remove some unused code related to hierarchical folders. This allows nested folders to work properly. Bug: 9762055 Bug: 9694899 Bug: 9565828 Change-Id: I8ba2e96e6b478dd73e11fdcaf2c02643f1370e57
* Don't change ToastBar bottom margin.Andrew Sapperstein2013-08-201-2/+0
| | | | | | | With no conversation view pager title strip, we don't ever need to change the height. Change-Id: I7d18919a156296f3ed8bd0f2e1098e6085b1469c
* Show the selected state on an ad on two paneScott Kennedy2013-08-191-1/+1
| | | | | | | Also show the selected caret Bug: 10212376 Change-Id: I075b2aebfbe869c658108f7d36109ad70402b4c7
* Refactor ActionableToastBar and ToastBarOperation.Andrew Sapperstein2013-08-091-5/+4
| | | | | | | | Now supports ToastBarOperation performing actions when the action button is clicked or the toast bar disappears. Change-Id: If191e3cbbf404d2371e086e105627c9474167e8a
* Add new ViewMode.Andrew Sapperstein2013-08-071-3/+4
| | | | | | | Works in OnePaneController. Need to wire up the buttons. Change-Id: Ia9aa5e696cbba1d170038e47d4941cc6fcf0a967
* Fix drawer handling when in "Waiting for sync" stateTony Mantler2013-08-051-9/+3
| | | | | | b/10153197 Change-Id: Ic65855e9210271cdc3b715c64d8d786026ae9a67
* Change all resid switches to if-elseif-elseScott Kennedy2013-07-311-17/+16
| | | | | | | | | | | | | | | | | I really want to get this building in an IDE. As per http://tools.android.com/tips/non-constant-fields, library projects (like UnifiedEmail will be) have non-final R constants. They are not final until packaged into the main application project's (Gmail/Email)'s R.java. As such, they cannot be used in switch case statements, and we must use if-elseif-elseif-elseif-...-else instead. "This is typically in UI code and the performance impact is negligible." Change-Id: Ie699c13e1becd51c59c1b2ea81bc902d4f2e28d9
* Ads in conversation listScott Kennedy2013-07-291-1/+6
| | | | Change-Id: I3095409211d6a6bdc42212bcd6a330333a9da411
* Remove references to the Folder ListScott Kennedy2013-07-161-74/+3
| | | | Change-Id: I9f6b9d7f6c5100324703449da4761e67266ebed0
* Add a new FolderUriScott Kennedy2013-07-161-3/+4
| | | | | | | | This will allow us to add query parameters such that Uris will still appear to be equal, regardless of differences in the parameters. Bug: 9780067 Change-Id: Iafe39763b3ee448cf02536df89caa736500dfdaf
* Up button should go upScott Kennedy2013-07-101-2/+38
| | | | | | | | Previously, it was always opening the drawer, even if it showed the up caret. Bug: 9761890 Change-Id: I337c84683207e2dcb22cb55a66f9e79087016e2e
* Parent folder as a URIVikram Aggarwal2013-07-031-12/+12
| | | | | | | | | | 1. Change folder to a URI 2. Fix references. Bug: 9694857 Populate folder.parent correctly in the provider Bug: 9694899 Clean up the hierarchy folder code Change-Id: I4eff33d0259777e447cfe5769813db990f142077
* Nested folders for phoneVikram Aggarwal2013-06-071-30/+4
| | | | Change-Id: Iba5569d4f6cf57b8edc37d7dfd8a5c2fa13a0b66