summaryrefslogtreecommitdiff
path: root/src/com/android/mail/ui/FolderSelectionActivity.java
Commit message (Collapse)AuthorAgeFilesLines
* Display sync errors using snackbar and not as a TL footerJames Lemieux2014-09-301-5/+0
| | | | | | | | | | | | | | | | | | | | | | b/16463253 The FAB compose button overlaps the action button found in the TL footer when network errors occur during sync. To avoid this overlap, the snackbar is used to display these errors and they no longer appear as a TL footer. In order to signal the sync error to AAC for display in the snackbar, the Folder.lastSyncResult needed to be encoded in the manner that AAC reads. This was not happening for POP/IMAP/Exchange accounts, so a large portion of this change is encoding that value properly every place it is written. To ensure the value is read/written properly everywhere, common methods were introduced in UIProvider that do this work. UIProviderTest was also added to ensure the read/write methods agree with each other. Finally, the display of the "Load More" TL footer was updated to match the latest spec. Change-Id: Ia44f4ca1caa77c5d76f58d75fa4ab308442d2a72
* 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-22/+0
| | | | | Bug: 17322937 Change-Id: Idc21156e6d5e9ea4e83e3c17e92a66388ffc7a6a
* Remove some unnecessary interfaceJin Cao2014-08-251-14/+2
| | | | | | | | | Remove unused interface for ActivityController and ControllableActivity. b/17258810 Change-Id: I8edbff09b1a5a3278efad8675e3fc3f71e82d2e4
* Quantum search - version 1Jin Cao2014-08-211-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+6
| | | | | | | | | | | | | | | | | | | 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
* switch to appcompat. b/16664350Andrew Sapperstein2014-08-041-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently only for MailActivity, ComposeActivity, and FolderSelectionActivity. Any activity that inherits from ActionBarActivity must use an Appcompat-derived style. Three styles currently exist: UnifiedEmail.Appcompat, UnifiedEmail.Appcompat.Toolbar, and ShortcutWidgetTheme are all based on appcompat. go/appcompat-material-doc contains the full migration guide. The fast version is: All MenuItem-related work that relates to actions must use the MenuItemCompat-equivalent. Any theming should use the appcompat versions which don't require a namespace prefix. For instance, use actionBarStyle instead of android:actionBarStyle. There are a few missing styles on views that can't use appcompat versions. Those still use style overrides for v21 changes. All others use appcompat versions. A few methods on activity should now use the support equivalents: getSupportActionBar() supportInvalidateOptionsMenu() startSupportActionMode() Change-Id: Ic6f5964f4115ab4bde49c19df5fe49c9086df965
* Revert "Revert "Megadrawer" until b/16637856 is fixed."Andrew Sapperstein2014-08-041-6/+0
| | | | | | | | 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-0/+6
| | | | | | This reverts commit d4bb2af4a545493b88e900be5262329c715dd38a. Change-Id: I3c8860d30cde8b70c135c2ef457f5f601b45b8b5
* MegadrawerTony Mantler2014-07-281-6/+0
| | | | | | b/16458862 Change-Id: I476ee21209e8108fc77e3d265326347a53f13ef5
* Replace all references to UnifiedEmail's com.android.oldbitmap withJames Lemieux2014-07-111-1/+1
| | | | | | | | | equivalent usage of framework's com.android.bitmap. A small refactor of AccountAvatarDrawable.drawBitmap(...) is also included which produces no functional change. Change-Id: Ic67690cde56de6ca691ac8647ef02865b766ca62
* Add Account/Folder change observer to AccountController interfaceTony Mantler2014-07-071-13/+7
| | | | | | b/16131478 Change-Id: I4fa9fe3fdb4edcf1e2d4d551d5d93f6301bc1eae
* Refactoring Welcome tour activity.Milos Stankovic2014-07-011-1/+0
| | | | | | | | This is mostly cleanup in UnifiedMail. Most of the changes are in UnifiedEmail. b/15705426 Change-Id: Ifb1980d4e3e77f2dc7c9f70339552e49cf500033
* Refactor how the warm welcome is triggered.Régis Décamps2014-06-261-6/+0
| | | | | | | | | | | | - 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
* Implement support for help libraryRay Chen2014-06-241-6/+5
| | | | | | | | | | | 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
* Changes to support displaying a welcome tour.Greg Bullock2014-06-161-1/+8
| | | | Change-Id: Ice10fd8d629a9f4aebe5cfb7cb94bc1eb5ebaaeb
* Allow alternate sources for contact images.Andrew Sapperstein2014-05-281-0/+26
| | | | | | | | | | | | | | | | | | | | | | Makes some classes that overridable in order to provide alternative implementations: ContactResolver, ContactResolverTask, ContactLoaderCallbacks, and ContactPhotoFetcher all can be subclassed to provide new behavior. Also added hooks in ControllableActivity and MailIntentService to override building these classes. NotificationUtils was also updated to force all calls through MailIntentService which can be overridden. Finally, moved the BitmapCache used in conversation list to the activity level instead of at AnimatedAdapter-level (which is effectively fragment level). This speeds up subsequent queries for images dramatically. We reset the cache when changing accounts. b/11387812. Change-Id: Ie70d800862b073163ccbfa5295d6950e57d64009
* Show "To:<Names>" in sent and outbox index viewsJames Lemieux2014-03-281-2/+2
| | | | | | | | | | | | | | | | | b/13304929 The solution being delivered introduces a new folder capability: UIProvider.FolderCapabilities.SHOW_RECIPIENTS which indicates a folder should display "To: " in front of its participants list because it is a folder containing outgoing mail or sent mail (thus viewing recipients is more useful than senders). This capability is returned for Drafts, Sent, and Outbox. Note that extra work was required to make this function properly in the widget we export to the launcher. See BaseWidgetProvider and friends for details. Change-Id: I2fa2394224ef3911992ab8d5cb67b05fdf5f3e85
* add floaty footer to the drawerAndy Huang2014-03-181-2/+8
| | | | | | | | | | | | | | | | | | | | * 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
* Make folders with subfolders selectable when creating widgetsTony Mantler2013-10-301-1/+3
| | | | | | b/10847899 Change-Id: Ie30cadf31747431f1c5b998b3d32e109c1a6c6b9
* Add comment for obsolete resource usageTony Mantler2013-10-101-0/+4
| | | | | | b/11155414 Change-Id: Ia1748bef097e39954701e3b76ca80a5bc9e897d7
* Revert "Revert "Fix hierarchical folders""Alice Yang2013-09-041-2/+2
| | | | | | This reverts commit 6e604d33ee0aab10a72c836af6e83ace315f4b79. Change-Id: I8eb30a3b38919e0efb694fc571b166a89258f517
* Revert "Fix hierarchical folders"Alice Yang2013-09-031-2/+2
| | | | | | | | Temporarily so we can take TOT UR10 This reverts commit ad41814e704f0e7575472e4e7b60dfaf68b2f3b1. Change-Id: I70f7b3b424c3da3785181c673c7c4f80737892aa
* Fix hierarchical foldersScott Kennedy2013-08-261-2/+2
| | | | | | | | | | | | | 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
* Add new ViewMode.Andrew Sapperstein2013-08-071-9/+0
| | | | | | | Works in OnePaneController. Need to wire up the buttons. Change-Id: Ia9aa5e696cbba1d170038e47d4941cc6fcf0a967
* Change all resid switches to if-elseif-elseScott Kennedy2013-07-311-8/+7
| | | | | | | | | | | | | | | | | 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-0/+6
| | | | Change-Id: I3095409211d6a6bdc42212bcd6a330333a9da411
* Add a new FolderUriScott Kennedy2013-07-161-4/+5
| | | | | | | | 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
* Attachments in Conversation List: Backend changes so that the appropriateMark Wei2013-07-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | attachments are passed to the UI. Implement PhotoManager so we can start showing images. Upon sync, we extract two image attachments from the first unread message, and add them to the conversations table. UI changes as well. Load BEST if that is available, else load SIMPLE. No vertical dividers in attachment previews. Attachment previews are above labels. Round badge appears for unread conversations when there are more images than shown. Only appears after the previews have loaded. Clicking on the attachment previews launches photoviewer. Attempt to load bigger images than necessary to prevent reloading during mark read/unread and rotate. Show animated loading icon while previews are loading. Previews load from top to bottom, from left to right. Big performance improvements: No longer decoding bitmap on UI thread. This kills most of the jank. Only load when we are not scrolling. This kills a lot of jank. Remaining jank will be delt with later: DividedImageCanvas.setDimensions() creates a huge empty bitmap on the UI thread, which causes a GC. ath will fix. Multiple images in one line now load whatever's ready first. Added tracing. Bitmap cache given more memory. Following ath's advice, decode Bitmap from InputStream rather than byte[]. Don't compress into BitmapHolder. Only use the bigger Bitmap cache. Bug: 7481049 Change-Id: Icf823f56abc9345e6d0b800a1e6d45444d8fa028
* Remove more unused code.Vikram Aggarwal2013-06-111-2/+2
| | | | | | | | | Drawers always show accounts. Nothing else does. Remove all misleading code that sets arguments that are always true. This has the happy side effect of reducing the number of arguments to construction methods. Change-Id: I6fc7b74328c1243e10640dce083d64296f17f9af
* Fist cut of nested foldersVikram Aggarwal2013-06-071-3/+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
* Unify LogTagScott Kennedy2013-06-051-3/+3
| | | | | | | | | | | | | | | | | | | | There is now only one LogTag class. The static initializer of GmailApplication (existing) and EmailApplication (new) will now set the log tag to "Gmail" and "Email", respectively. Up until that code is run, it will be "UnifiedEmail". "setprop log.tag.Gmail VERBOSE" (or .Email) will trigger all logs to be printed as long as they go through LogUtils, regardless of what tag is used by that individual log. This lets us still turn on logging everywhere in one command, but also lets us use more descriptive tags (like the class name). And since we no longer have three com.android.mail.utils.LogTag classes, builds will be much easier. Also, we now use LogUtils everywhere. Change-Id: Iec53e87cad0a46b73d2afbbd8d44aca097a5087a
* Fix hierarchical FolderListFragmentsScott Kennedy2013-05-301-0/+6
| | | | | | | | | | | | | | We were never using most of the args we set. There are multiple active FLFs (drawer and subfolder). Both of these are notified of folder changes, and then they check if that folder exists in their cursor. If not, they switch you back to the account's default inbox. However, the cursor for the drawer only has top level folders, so this breaks. Now, we have a full folder list cursor in each FLF, and this is used for that check. Bug: 8575001 Change-Id: I47f17fb9c5d108b2388db5ba918f6413a018b414
* Only pop the user to the inbox when the drawer is enabledScott Kennedy2013-05-021-0/+6
| | | | | Bug: 8788742 Change-Id: I97130b088956a25617e55f5454e980034461ce4a
* Start the conversation list load earlyVikram Aggarwal2013-05-011-1/+2
| | | | | | | | Using a hacky boolean to keep state. Will switch to listening to drawer state in a subsequent CL. Bug: 8743683 Latency when switching accounts/folders Change-Id: I94930b1886cd57c33cc1fa1e851aba0d1ebaa4d3
* Get inboxes from the folder watcherVikram Aggarwal2013-04-291-0/+7
| | | | | | | | | | | 0. Create a folder object in the watcher, off the UI thread. 1. Pass the folder watcher back to the controller 2. Get the inbox folder directly from the watcher. 3. If that fails, revert to the existing logic. Bug: 8743683 Latency when switching accounts/folders Change-Id: I36baaab675ff65b43ce5ab1ad3485259a700ce1f
* Close drawer when not changing foldersRohan Shah2013-04-291-1/+1
| | | | | | | | Drawer should close upon clicking the currently selected folder or clicking the current account while viewing the inbox. Change-Id: I1f4827e9386289172ea3b1137c393dd1d6fc587c
* Remove account from widget folder selectionRohan Shah2013-04-251-2/+2
| | | | | | | | For widgets, we should not show accounts. Removed from list by adding an instance var to manage it. Bug: 8713654 Change-Id: I1cb8b219e67e6d61e6e767a27077b1b8c31ccd3e
* Remove drawer jank and load less aggressivelyRohan Shah2013-04-221-0/+22
| | | | | | | | | Added an observer that only allows account/folder changes to continue once the drawer is closed to avoid jank/awful fps that we saw before. Bug: 8661186 Change-Id: I859882b40a8cdf86d0b825eb7e4203b4e3516ecd
* Properly implement clicking active account.Andrew Sapperstein2013-04-191-0/+7
| | | | | | | | | | | | Fixes b/8656442 while preserving fix of b/8470761. Instead of reworking changeAccount, we now have a second method called switchToDefaultInboxOrChangeAccount which is called by FolderListFragment. It does the folder-switching specific code before going into changeAccount. changeAccount is now back to its original code which is also run when you open from a widget or notification. Change-Id: Ib4b6f68e7464e947028cc870625fe6a9d8afe00e
* 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
* Fix excluded typesVikram Aggarwal2013-03-291-2/+1
| | | | | | | | | We only need to exclude types only for top-level lists, not subsequent hierarchical folders. Bug: 8506090 Excluding folder types is currently broken Change-Id: I1c18a9302c756c55f9e12ed33bfd8fe9820a7108
* Enable Hierarchical folder listsVikram Aggarwal2013-03-261-9/+7
| | | | | | | | This re-enables hierarchical by either getting the folder list URI at construction time or as a list from the current account. Bug: 8473060 Folder List Fragment for Hierarchical folders is busted Change-Id: I5c8435b521f436f65bff83803c70684eb6d2dd40
* Remove MORE label referencesRohan Shah2013-03-261-1/+1
| | | | | | Remove the more label entirely from FolderListFragment and DrawerItem. Change-Id: I4f557764325f9065aa8c02bb10a88afbd93e53a4
* Fix buildVikram Aggarwal2013-03-261-1/+2
| | | | Change-Id: I2c2e7beec37610240900c66fed56dd58efe8d170
* Reset the FLF arguments when the account changes.Vikram Aggarwal2013-03-251-5/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Exclude all inbox labels when we're viewing an inboxScott Kennedy2013-03-201-1/+1
| | | | | Bug: 8426563 Change-Id: Ib9256fcdb658cb3df9b67485f7768f75bb8b6539
* Merge "Remove collapsed headers for tablet only" into jb-ub-mail-ur9Alice Yang2013-03-151-1/+1
|\
| * Remove collapsed headers for tablet onlyRohan Shah2013-03-151-1/+1
| | | | | | | | | | | | | | | | Take out "More" and "More accounts" when the FolderListFragment is displayed on tablets thru the two pane layout. Change-Id: I4a4ee8a7572edd6b025dc82a490f3f3603d10beb
* | Teaser view for sectioned inboxScott Kennedy2013-03-141-0/+6
|/ | | | | | Still some changes required as the spec is updated, but it works. Change-Id: I068488d057e42bc62af36e532d55ce17f695f49d