summaryrefslogtreecommitdiff
path: root/src/com/android/mail/ui/MailActivity.java
Commit message (Collapse)AuthorAgeFilesLines
* Reset search button visibility on account changeJin Cao2014-10-151-5/+9
| | | | | | b/17982775 Change-Id: Ia27a7364f49b7cf8a1cbfc158123b543d6b8b7fc
* Add current focus to MailActivity toStringJin Cao2014-10-141-0/+2
| | | | Change-Id: I8df1dba5167523a6b2468263cc29ea9398631f56
* Change status bar color for searchJin Cao2014-10-071-16/+3
| | | | | | b/17546831 Change-Id: Ib72000b6a2bcaa325dc2b82a819a7c823454a0d8
* 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
* Expand drawer to be under status bar. b/17569398Andrew Sapperstein2014-09-181-1/+2
| | | | 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
* Set status bar color in CAB mode. b/17471621.Andrew Sapperstein2014-09-151-1/+29
| | | | Change-Id: If23bdce538aa647952d193a9976d6a27bcfd5829
* Welcome tour smooth launchGreg Bullock2014-09-121-26/+0
| | | | | | | | | | | Remove the loader mechanism and instead have the activity determine if the tour is required. Also a minor refactoring of moving the VOICE_SEARCH_REQUEST_CODE from MaterialSearchViewController into AbstractActivityController. Bug: 16124942 "WarmWelcome screen is shown after Inbox view is presented..." Change-Id: Icd0ed2a976d8e8acc387336d1a81c690ab961efb
* Log when hard keyboard is usedJin Cao2014-09-091-0/+11
| | | | | | b/17357003 Change-Id: I69ee4fcafe13140208b0165b005774536cb5d060
* Merge "Keyboard support for focused state" into ub-gmail-ur14-devJin Cao2014-09-031-2/+2
|\
| * Keyboard support for focused stateJin Cao2014-09-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | Use custom toolbar only for tablets and fix line sizeJin Cao2014-09-021-3/+8
|/ | | | | | | | | | | - only use custom toolbar for tablets so phones won't get any bugs associated with it. - for tablet toolbar title, set it to single line and ellipsize properly in case of long title. - also align title text accordingly. b/17332114 b/17331396 b/17360830 Change-Id: Ib7eecf684303a877a228d7453e2df8825842b6ba
* 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-8/+5
|\ | | | | | | ub-gmail-ur14-dev
| * Add custom view for toolbar to reposition search iconJin Cao2014-08-251-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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-6/+0
|/ | | | | | | | | Remove unused interface for ActivityController and ControllableActivity. b/17258810 Change-Id: I8edbff09b1a5a3278efad8675e3fc3f71e82d2e4
* Quantum search - version 1Jin Cao2014-08-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+5
| | | | | | | | | | | | | | | | | | | 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-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-8/+3
| | | | | | | | Want this to be ready when the bug is fixed. This reverts commit c53c887101aa90b5024af635823023aa801e075f. Change-Id: Ice73a0f48cbe1e949fde3db3719ee86995778ebb
* Welcome tour: Shortcut to discard the welcome tourRégis Décamps2014-07-301-0/+13
| | | | | | | | | | Add a method that indicates wether the welcome tour was shown on this device. Hence, the AbstractActivityController can avoid calling the WelcomeTourStateLoader machinery. b/15705426 Change-Id: Iacbb94f46a9de4bf7f1700ef5c244d5a50007810
* Revert "Megadrawer" until b/16637856 is fixed.Andrew Sapperstein2014-07-281-3/+8
| | | | | | This reverts commit d4bb2af4a545493b88e900be5262329c715dd38a. Change-Id: I3c8860d30cde8b70c135c2ef457f5f601b45b8b5
* MegadrawerTony Mantler2014-07-281-8/+3
| | | | | | b/16458862 Change-Id: I476ee21209e8108fc77e3d265326347a53f13ef5
* Rearrange MailActivity layout loadingTony Mantler2014-07-221-4/+19
| | | | | | | | | 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
* Extract AccountLoadCallbacks so that it can be re-used.Greg Bullock2014-07-221-0/+1
| | | | Change-Id: I24a50abf78b1a44269914126a86813c3e8b97d4e
* Replace all references to UnifiedEmail's com.android.oldbitmap withJames Lemieux2014-07-111-3/+3
| | | | | | | | | 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
* Fix CrashPaul Westbrook2014-07-081-1/+1
| | | | | Bug: 16127858 Change-Id: Ib282085130cfd1c53d791e063ee5e20431c7768d
* Refactoring Welcome tour activity.Milos Stankovic2014-07-011-1/+1
| | | | | | | | This is mostly cleanup in UnifiedMail. Most of the changes are in UnifiedEmail. b/15705426 Change-Id: Ifb1980d4e3e77f2dc7c9f70339552e49cf500033
* Fix action bar iconPaul Westbrook2014-07-011-3/+3
| | | | | | | The action bar app icon is now suppressed both on pre-L and in L Change-Id: Ifcf416505622ae72f260049c0b1e4a1e972e5431
* On L devices hide app iconPaul Westbrook2014-06-281-0/+8
| | | | Change-Id: Ibe16fd44a1d5aeefec7c8b9a2c91f4a3f8d6fe9b
* Refactor how the warm welcome is triggered.Régis Décamps2014-06-261-5/+11
| | | | | | | | | | | | - 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-2/+7
| | | | | | | | | | | 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-0/+7
| | | | Change-Id: Ice10fd8d629a9f4aebe5cfb7cb94bc1eb5ebaaeb
* Allow alternate sources for contact images.Andrew Sapperstein2014-05-281-1/+42
| | | | | | | | | | | | | | | | | | | | | | 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
* Logging for cold start and searchJin Cao2014-04-251-0/+7
| | | | | | | | Added timing logging for cold start into a list view and search. b/13628866 Change-Id: I9d3214ccb8ba259354c087ab89f447d23ee02e89
* Stop keeping all the thingsScott Kennedy2014-04-031-12/+0
| | | | | | They're not needed. Change-Id: I304fff784cbd4cc87c674e950f7a1b891f11413b
* add floaty footer to the drawerAndy Huang2014-03-181-0/+5
| | | | | | | | | | | | | | | | | | | | * 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
* Move Help & feedback to Nav drawer of Email.James Lemieux2014-03-131-0/+5
| | | | | | | | | | | | | | | | | | | 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
* Add new ViewMode.Andrew Sapperstein2013-08-071-11/+0
| | | | | | | Works in OnePaneController. Need to wire up the buttons. Change-Id: Ia9aa5e696cbba1d170038e47d4941cc6fcf0a967
* Ads in conversation listScott Kennedy2013-07-291-0/+5
| | | | Change-Id: I3095409211d6a6bdc42212bcd6a330333a9da411
* Suport for Contact photo teaserPaul Westbrook2013-07-151-3/+5
| | | | | | | | 1) Move the preference for show sender images to MailPrefs 2) Create a ConversationListHelper in MailActivity Bug: 9497358 Change-Id: I6965d22891b3a8e05c89fc0bfe1330732c19d36a
* Clean up a bunch of warningsScott Kennedy2013-06-251-1/+1
| | | | | Bug: 9565838 Change-Id: Ie3a380581e81c63aaa0764875c55bfdccd5f2b13
* Fist cut of nested foldersVikram Aggarwal2013-06-071-2/+1
| | | | | | | | | | | | | | | | | | | | | 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-2/+0
| | | | | | Documentation on usage of loaders close to the source of the action. Change-Id: I6562950d781dbab3ba00f7d921eeae88ed64f610
* Use the ActionBarDrawerTogglePaul Westbrook2013-04-211-0/+14
| | | | | 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
* fragment transaction / back stack cleanupAndy Huang2013-04-031-0/+2
| | | | | | | | | | | | Execute all fragment-replace transactions in 1-pane immediately. This was contributing to b/8483995. Don't use the back stack in secondary activities. Not necessary. No material change to back-stack usage in 1-pane. Add debugging info to key fragments/activities. Change-Id: I1268cfbfaaca16b812b9e690facf912a1c9c4bc0
* fix blank conversation view on tablet when launching from intentAndy Huang2013-04-011-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | If a 2-pane layout pass finished before the FIRST_FOLDER loader returned results, the layout pass triggered an early showConversation() operation before mConversationToShow is set by the FIRST_FOLDER loader. The later showConversation() in the FIRST_FOLDER onLoadFinished did not re-run the operation, because it assumed a transition would run that showConversation had to wait for. The transition does not actually run because TwoPaneLayout debounces consecutive requests to change the view mode. So... * don't switch modes on FIRST_FOLDER load unnecessarily * FIRST_FOLDER load was triggering a mode change to LIST, so move that into loadAccountInbox * don't have 2-pane ask ViewMode to see if the mode changed, have it ask TPL instead Add some helpful optional logging, and a facility to ObjectCursorLoader to slow down race conditions for debugging purposes. Bug: 8408885 Change-Id: If4672c0f6c4426f810de33f65694119d678bacfb
* Teaser view for sectioned inboxScott Kennedy2013-03-141-1/+7
| | | | | | Still some changes required as the spec is updated, but it works. Change-Id: I068488d057e42bc62af36e532d55ce17f695f49d
* fix search hard key handlingAndy Huang2013-03-041-6/+0
| | | | | | | | | onSearchRequested(String) -> executeSearch(String) No sense getting this confused with the very-different Activity.onSearchRequested(). Bug: 8309831 Change-Id: I20dfaa854d6dfb1b8a774337ae2ae1b0db17abce