summaryrefslogtreecommitdiff
path: root/src/com/android/mail/ui/TwoPaneLayout.java
Commit message (Collapse)AuthorAgeFilesLines
* Combine conv and misc panes into one frame and animate that insteadJin Cao2014-10-171-25/+21
| | | | | | | | | | | | Don't rely on ViewMode to check whether to animate the conv or misc panes because the view mode might not have been changed when we select a new conversation or ad. Logically, these two panes should always move together anyway because a misc frame is simply a specific way of displaying content in the conversation view. b/18033659 Change-Id: I5d5417e2ca77f019abbf8d739b691f2029010eae
* fix occasional blank CV panes on activity startupAndy Huang2014-10-151-2/+17
| | | | | | | | | | | | The condition in onViewModeChanged made it impossible to get out of UNKNOWN view mode if onLayout had been called before the view mode was first set. Fix this by looking for something a layout would definitely have set (a non-zero width). Added some debugging toString() for TPL. Bug: 18009285 Change-Id: Ibacaa1f6473edeefceccfd270c2a761113c6e530
* Cleanup of drawer dragJin Cao2014-10-151-4/+4
| | | | | | | | | - Don't do anything in enableHardwareLayer if it's already enabled - Add onDrawerDragEnded in TPC for consistency so it has access to all 3 drawer events. - Change ObjectAnimator back into ViewPropertyAnimator Change-Id: If78b833d35f0c37f6b9e4d8c644c8a6714bfc7b7
* Enable hardware acceleration for drawer dragJin Cao2014-10-151-1/+1
| | | | | | b/17936591 Change-Id: Ie9b435a1c0af457a0524b95a20ece3f3cb829011
* Allow dragging the drawer close from CVJin Cao2014-10-151-6/+18
| | | | | | | | | | When the drawer is open, tapping on the CV pane will auto close the drawer, and dragging on the CV has the same effect as dragging on the TL. b/17922832 Change-Id: Ib518ed58cee9752dd8c8713f2bdcb5c65f4afac0
* Cross-fade the drawer on toggle/dragJin Cao2014-10-141-7/+3
| | | | | | b/17936591 Change-Id: I7720b5091d22d3361fd3660976674a725d9563c7
* Merge "Don't allow for drag during mode change" into ub-gmail-ur14-devJin Cao2014-10-151-0/+4
|\
| * Don't allow for drag during mode changeJin Cao2014-10-141-0/+4
| | | | | | | | | | | | b/17983791 Change-Id: Ic50b55469f2fa4054daa022c3ee58626fcc7e1c0
* | Merge "TPL don't set transitionedMode until onTransitionComplete" into ↵Jin Cao2014-10-151-2/+3
|\ \ | |/ |/| | | ub-gmail-ur14-dev
| * TPL don't set transitionedMode until onTransitionCompleteJin Cao2014-10-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Since we are ensured that onTransitionComplete will always be called (via either manual call when we are setting translation individually or called by onAnimationEnd), we should delay setting mTranslatedMode until it's called so we are sure that isModeChangePending won't return true until animation completes. b/17975798 Change-Id: Ib452b372bc58ecb0a3eb3fa4b1584df9de1b9070
* | Mini-drawer drag ensure that ghosts of fake shadow get invalidatedJin Cao2014-10-131-17/+19
|/ | | | | | | | | When we drag the drawer, invalidate the entire region of the drawer that is shown on the screen to ensure that the shadow gets invalidated. b/17971748 Change-Id: I9c60f4504ed59abd72a53dc5d25089f2eb9ed2d8
* Support finger tracking for tablet drawer/minidrawerJin Cao2014-10-101-135/+305
| | | | | | | | | | | - Supports dragging the mini drawer open - Supports dragging the full drawer close by dragging along the list pane (not the drawer pane) - Supports RTL mode b/17206080 Change-Id: I8ac8933ed30ca92f162cc6a75865fa1fdc1b2cb1
* Make CV disappear when waiting for sync/initializationRohan Shah2014-10-061-0/+1
| | | | | | | | | We did not have a case for waiting_for_account_i12n in TwoPaneLayout to make the conv pager go away, as we do with changing folders and only showing the conv list. Bug: 16982893 Change-Id: I58127e5e6308e851bf0269ea2b6ab81017bb9260
* Merge "Fix ad mode for two pane layout" into ub-gmail-ur14-devJin Cao2014-09-301-1/+1
|\
| * Fix ad mode for two pane layoutJin Cao2014-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | Positions the panes properly when the view is in ad mode. Also fixes the bug where twopanecontroller only checks conversation mode for setting up action bar icon. b/16821877 Change-Id: I07191d67f8e4c395063f89dc3d037c1eaf2a14e7
* | Don't hide FAB when drawer is openJin Cao2014-09-301-5/+1
|/ | | | | | b/17693231 Change-Id: If96b6042c2f6ddd0c45b8813eb7094fb3bc1c281
* Use ViewMode in TPL instead of manually checking convRohan Shah2014-09-261-2/+5
| | | | | | | | | | | | | | Opening an email from notifications in tablet portrait sometimes caused issues with the TL being unresponsive and the Conversation being invisible (was really stuck off-screen). Changed back to a ViewMode check to avoid cases where the ViewMode is changed but the conversation has not yet been set. Bug: 17571873 Change-Id: Id69126c60542b49ae7e10f0b0e6ce9e5bf982eaf
* Merge "Update shadow assets" into ub-gmail-ur14-devRohan Shah2014-09-241-1/+1
|\
| * Update shadow assetsRohan Shah2014-09-241-1/+1
| | | | | | | | | | | | | | Moved from 6dp to 4dp for start shadows and 4dp to 2dp for end shadows on either side of the TL. Change-Id: I0eca8b5eac1c00ff3d17c2bbc2eadb726e856f5e
* | Bug fixes for search tabletJin Cao2014-09-231-2/+3
|/ | | | | | | | | | | | | I introduced with some bugs with my recent CLs for showing the transparent search bar in tablet landscape. - don't call onConversationListLayout unless it's in tablet landscape (this is documented on the interface). - update the code for setupEndingButton to take into the new alignment into account. - set search button to invis after animating it to transparent. Change-Id: I348626603b47eb8a536cd5c54eaa9db5027fdbfe
* Move FAB inside TL in 2-pane layoutRay Chen2014-09-221-2/+5
| | | | | | b/17136827 Change-Id: I76a4a0a1dfabd45d4bdbec6aa0beaae3476fcf91
* Update shadows for TL (Quantum) UnifiedEmailRohan Shah2014-09-191-3/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: I'll fix FAB issues in a different CL Add shadows assets on L & pre-L (RTL included) for thread list sides. To avoid overdraw, the backgrounds have been modified (The outermost framelayout for TL now has a white background instead of each of the conversation items). For both L & pre-L, we're using two shadow assets on either side of the TL, both of which are set as backgrounds for the drawer and the conversation view (conv pane). Elevation didn't work out too well and will be revisited while fixing overdraw issues (Need to move around swipe/leave-behind item backgrounds and it seems a bit risky to mess with it given the timeline) + Also removed the background on the loading item under conversations in the TL and used the default conversation item background to get rid of the ugly divider/slight line flicker on folder change Bug: 17461682 Change-Id: Id9e4504b6063f21a055ed492fc8de962e6e52462
* Remove previous code for moving FAB into TLJin Cao2014-09-181-25/+3
| | | | | | | | | Use ray's approach of moving the view into TL so we won't have to keep these states for animating the FAB. b/17514925 Change-Id: Ib1c6328158a12defba9fc0c13640e1814481f89f
* tablet search icon bug fixes and simplificationJin Cao2014-09-171-4/+7
| | | | | | | | | | | - instead of setting the title padding, simply set the full width of the parent accordingly for two-pane land. - only call onConversationListlayout in tablet landscape mode. - change from visibility to alpha animation to ease the transition. - set the icon to not be clickable when invisible. Change-Id: If992c97c96eff334a3de82c2583bcdd10e391ed6
* [Quantum search] new two-pane land search result listJin Cao2014-09-171-8/+10
| | | | | | | | | | 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
* fix slow 2-pane transitions; fix 2-pane animations in portraitAndy Huang2014-09-161-39/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | The instant visibility changes on layout after mode changes were preventing the animations from running. Defer any cases when moving to invisible state until after the transition is complete. Move FAB reveal earlier when going CV->TL on 2-pane portrait by triggering list-visibility-changed manually when entering TL mode. TL- >CV hides the FAB after transition complete as usual. Position and animate 2-pane elements after normal layout, since some size calculations depend on having performed a layout already. Fixes some FAB-related race conditions I started seeing with the animations working again. b/17514925 tracks the fact that FAB shouldn't need to move about in this way in the first place (since it's pretty much always tethered to TL). Also short-circuit an infinite loop that triggered continuous relayouts when an Ad is present. This change reverts to the older logic of only positioning/animating panels on known layout change events, which also has the side effect of smoothing out the animation. Bug: 17477114 Bug: 16818991 Change-Id: Ice1f6b896b9d7dc434debb3c2cf15aec87551ebc
* fix phantom tap interference on tablet w/ open drawerAndy Huang2014-09-111-2/+6
| | | | | | | | Ads view was secretly present, stealing tap events on the right side of the conversation list. Bug: 17460379 Change-Id: Ie5a0bbf465f45ce10cd5e678d3b99db683e27f05
* Tapping in Ad body should close drawerRay Chen2014-09-041-0/+1
| | | | | | b/17189207 Change-Id: I02dd31fac2304848f1967746be17124cfceab2d0
* Hide search button when drawer is openJin Cao2014-09-031-2/+3
| | | | | | | | | In two-pane landscape mode, hide the search button when the drawer opens instead of re-positioning it. b/17332335 Change-Id: Ibefb3b31998f3ac1a4d0095f274f307781b60008
* Merge "Fix two-pane RTL" into ub-gmail-ur14-devJin Cao2014-09-031-12/+17
|\
| * Fix two-pane RTLJin Cao2014-09-021-12/+17
| | | | | | | | | | | | | | | | | | | | Properly position and show everything in RTL mode. This includes properly calculating the X coordinate for the FAB and calculating the visibility of list/conv views in two-pane landscape. b/17359680 Change-Id: I887fbb89d9680c98a12ec902d2cba41c30c410ba
* | Fix search RTLJin Cao2014-09-021-2/+2
|/ | | | | | | | | - Fix search suggestions RTL padding and alignment - Fix search button positioning in RTL for tablet land. b/17328599 Change-Id: I982e086738f9f75f39ce9149590cfabc37259d30
* Two-pane hide floating actions until they are positionedJin Cao2014-09-021-1/+6
| | | | | | | | | | To avoid seeing the jump of the FAB when the two-pane layout is being positioned, hide the entire floating actions parent until the positions are calculated by the layout. b/17136827 Change-Id: I28f3274f3654667b0812b3e3f9b91257813a704c
* TwoPaneLayout changes position of FAB as wellJin Cao2014-08-291-4/+20
| | | | | | | | | | In two pane mode the FAB positioning will follow the position of the list/conv view. This way, the FAB button is always by the bottom right corner of the list view. b/17136827 Change-Id: If5e9fea2bd177132042fd26547c437b20a005e7f
* Show current folder on tablet landscapeRohan Shah2014-08-271-1/+1
| | | | | | | | | | | When in conversation view mode, we were not showing any text on the title bar (setEmptyMode). Changed it to be visible if in landscape by checking the is_tablet_landscape boolean (renamed), which we currently use with TwoPaneController. Bug: 16985409 Change-Id: I9a35b3b46f024584e1c47936def5aa854c52813d
* 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
* No more need for layers in 2-paneAndy Huang2014-08-221-23/+0
| | | | | Bug: 17201149 Change-Id: I1448827ac83a6f54e724145beb1bb6ab45a2e27a
* [KBNav] two-pane landscape navigation polishJin Cao2014-08-111-14/+9
| | | | | | | | | | | | | | | | | | | 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 CV] basic support for CV keyboard navJin Cao2014-08-081-0/+13
| | | | | | | | Support basic navigation via keyboard in CV. b/16636060 Change-Id: I66dbcd8015d722244b57c4e24579d0d854d3ee74
* mini-drawer. new tablet UI.Andy Huang2014-08-011-255/+69
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* RTL the conversation list and two pane layout.Andrew Sapperstein2014-01-151-17/+32
| | | | | | | | Fixes: b/12451886 b/12452546 Change-Id: If2bd3d63c07eda3190d16fd95746c0105b251406
* Fix tablet ad issueScott Kennedy2013-09-031-1/+1
| | | | | | Clicking an ad was causing the ad to be deleted. Change-Id: I17f80ef5f93bdbeafe61df919ecb7d2c8acd5bb4
* Support ads in TwoPaneLayoutScott Kennedy2013-08-191-6/+34
| | | | | Bug: 10212376 Change-Id: I8598501deb8012e6a8ec543c419cf6b251178e2a
* clean up 'collapsed' constantsAndy Huang2013-06-181-1/+1
| | | | Change-Id: I8bb38ac918f061cd9ed4ad21d9ed686672dbde15
* Don't allocate a copy view bitmap on portrait tabletsAndy Huang2013-06-171-6/+12
| | | | | | | | The list copy view, used for cross-fading the list as it transitions in width, should do nothing when the width stays the same. In practice, we can skip this large bitmap allocation on portait tablets. Change-Id: Ie35e0b1f25624307a51453c67e8c50e8fc36251d
* Minor changes to reduce allocationsPaul Westbrook2013-06-131-20/+24
| | | | | | | | | | | Don't use anonymous inner classes, as these objects would get instantiated for each usage. (This could also cause the containing classe to remain referenced Initialize Bundles and ContentVales to the ideal size to prevent the objects from being resized Change-Id: If83ad94f67149d54847c3cdb5244e1841d7b369c
* Return to inbox when hitting back from label.Andrew Sapperstein2013-05-301-0/+3
| | | | | | | | | Fixes b/9006969. When we're in 7-inch tablet, we need to return to inbox when in a non-default inbox label. But 10-inch tablet should exit. This CL makes that happen. Change-Id: I4ff562ebfe490cc9d8a740d1dbc3d2370194909e
* Show/hide menu items based on drawer open/close.Andrew Sapperstein2013-05-131-1/+4
| | | | | | | | | | 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
* grand unified toast bar sizingAndy Huang2013-05-081-1/+5
| | | | | | | Death to constants. Bug: 8872920 Change-Id: Ic90ddac4b741ec57dd59aadf4d3d426d9813e105
* harmonize all blues, remove impostor assetsAndy Huang2013-05-011-1/+3
| | | | | | | | | | | | | Purge assets that are various shades of blue in favor of using colors. Per visD, remove conversation list shadow on 2-pane. This saves the hassle of baking in shadows into all background assets. Remove wide-mode background assets in favor of phone versions. New darker refresh bar assets. No more need for a white frame. Add shadow to drawer-less folders list. TODO: delete wide selectors and assets. TODO: implement caret on tablet. Change-Id: Iecec3eaaa3c37b856cbed64d2b53ddf77a00582f