- Introduce inset to the staged split view
- Update width of the staged split view
- Introduce rounded corners to staged split view. It's tricky to animate it in with smooth transition considering the rounded corners. The best way to handle it is to draw content as if part of it is off the screen, so that when it's animated in, the rounded corners can slide in onto the screen correctly.
Fixes: 219085340
Test: https://recall.googleplex.com/projects/f46cfe9c-8076-4efe-bf8a-b1cc4f1f5e1b/sessions/09a99b75-3614-4d20-b6d4-a78108f769d8
Change-Id: I24d90cc9e2695d822cb2de8b21e2d5519f2e344d
Fixes a set of issues in Overview where you could cause split thumbnails to overflow their contents into each other by rotating the phone in certain ways.
The issue occurred because StagedSplitBounds objects have their height and width assigned differently depending on if they were created while the phone was in portrait or landscape.
Fixed by adding a conditional check in PortraitPagedViewHandler#setSplitTaskSwipeRect and LandscapePagedViewHandler#setSplitTaskSwipeRect.
Fixes: 218784856
Fixes: 218779313
Test: Manual on local devices
Change-Id: I04b4f4344250da34616ab1744af22fa41b9aba9b
(cherry picked from commit 1d6b7f2abf)
In grouped task view, paired icons will now align better with task thumbnails.
Fixes: 218783211
Test: Extensive manual testing on local device(s).
Change-Id: I372d2ee90302a8d96ace048ff4f82126d9b2b363
(cherry picked from commit d6826c74a4)
In grouped task view, DWB banners will now rotate properly when phone is
in landscape or seascape orientation. Also fixes a couple of minor
existing issues with the bottom task not displaying correctly in the
first place.
Fixes: 208357326
Fixes: 216218406
Test: Tested locally on Pixel 6, using landscape, seascape, and
portrait. Double-checked with task proportions changed, RtL/LtR, and
split top/split left/split right initialization.
Change-Id: I945f9937d2d4d784c0c74a006c7d0680daf628c2
In splitscreen overview, the pair of app icons is now always centered at
the top of the view, rather than following the divider's position.
Test: Visually tested on local P6 device
Fixes: 208648221
Change-Id: I460d06047693c9376dab8215085d54aa4164d69f
- Update floatingTaskView, apply splitsSelectTranslation and splitPrimaryScorllOffest when rotating while in split select
- Moved getSplitSelectTranslation to RecentsView
- When in portrait, treat STAGE_POSITION_BOTTOM_OR_RIGHT as STAGE_POSITION_TOP_OR_LEFT in split translation calculation
- Apply splitsSelectTranslation for portrait grid too
Fix: 201721153
Test: manual
Change-Id: I768a3b15de4d434674058b274c368798f5852917
- Instead of using RecentsViewScroll, put task's position offset versus current scroll as TaskRect calculation, so it's considered when calculating for putting task to full screen
- Revert back RecentsViewScroll to apply before RecentsViewScale
- Added new property in PagedOrientationHandler to apply both primary/secondary param without clearing the other, and renamed an existing method
Fix: 206972618
Test: Quick switching
Test: Launch task from grid, launch side task from carousel overview
Change-Id: I5977975ed1e930ad70b81d83513d8f3a00c0aed4
* When swiping to QS from home, the
bounds for the rect on screen are incorrect
because it's technically off-screen when
it's being queried
Fixes: 206155441
Change-Id: Ibb17f2ac291f867b6de06041c980e434ce92cf27
- Removed mRunningTargetWindowPosition and mSplitOffset, as they countered each other out anyway
- Removed PagedOrientationHandler#setLeashSplitOffset() since it's no longer used
Test: Swipe up from split and non split apps in both orientations on large and small devices, with and without home rotation enabled
Bug: 200817624
Change-Id: I78a80cbc718ee38a8933fa323798fb436710d59f
* The width of the task menu view for landscape
(both fake and real) is the same as the width
it would be in portrait.
* With the shorter width, we also center the
positioning of the TaskMenuView
* Note this is only for phone, large screen
changes TODO
Bug: 193432925
Test: Tested real/fake landscape + seascape,
view is centered. Portrait same as before.
Change-Id: Ide41e252a3c177c4a911aab544f78930fed2e76f
* Hide all overview actions for GroupedTaskView
* Move some logic from TaskView into respective
PagedOrientationHandlers
* Remove unused methods from PagedOrientationHandler
* NOTE this is just visual changes. Properly showing
task menu's is still in-progress
Bug: 181704764
Test: Tested GroupedTaskView in portrait/landscape,
fake landscape in small screen, and real portrait/landscape
in large screen
Change-Id: I9c13ca114024db0a8e3fa5d295951696adb8516f
* Also add indicator if split was originally started
in portrait of landscape, so we know which dimension
of the divider bar to use if user goes to overview
and then rotates device (horizontal divider vs
vertical)
Fixes: 199461137
Test: Swipe to overview with staged split
Rotate device with and without live tile
Doesn't overlap with overview actions
Change-Id: I8b7f104f16d5b7265828f1b3d98ba3426b28d44f
* Divider bar dimensions manually calculated since
the leash that is provided has bounds larger than
the space that is visually shown between the two split
apps
Bug: 181704764
Test: Swipe up on large and normal screen,
w/ and w/o home rotation enabled
Change-Id: I1fde053151d47c6ce3e11f16f8ae4a153d273871
Shows up only for large screen devices, not phones.
Tested for NexusLauncher, general 3P launcher support
needed for staged split (TODO b/195607777)
Bug: 195423591
Change-Id: I4d455769b17637174b590c640516b9fbb6352c3d
* Maintain task split percentages when swiping up.
* Split percentages not maintained in GroupedTaskView, however.
That is a TODO.
Bug: 181704764, 181705607
Test: Swiped up in landscape with home rotation on/off.
Portrait still works.
Change-Id: Iec62abae34f6ccadf98e2afdc9409cf3160f8223
Bugs tracked in b/181704764
Bug: 181704764
Test: Tested on phone and large screen in multiple orientations
Change-Id: I07509006ae3d1f4425dc5119d0c8ed52b41a3bc2
Previously divider drawable dimension was set on height,
which only works when things are divided vertically.
For horizontal layouts, we need to set divider width.
Bug: 192398954
Test: Tested portrait + fake/real landscape
+ tablet
Change-Id: I5a63df9749bf37c3a563e923a1b4724aa17d9409
Long ways to go to final UI - TODO(b/186800707)
Add comments to grid layout code,
no functional changes at all.
Bug: 181705607
Test: Enter split screen from overview task menu
in grid and carousel. Able to select all items
and enter split.
Change-Id: Ib62f1b286acf0781ec47862fa31b670e6ff1892a
Still lays out horizontally when in phone
landscape.
TODO(b/186583656), need to center view.
Also have all layout be dynamic instead of having
some cases be in XML and some in code.
Bug: 181704764
Test: Task menu visible with all options in
portrait/landscape tablet
portrait phone
fake/real landscape phone
Change-Id: I3632eeb174f3e4baf2c9d69d51c1815c3c512e59
> Using EdgeEffect in PagedView for overscroll
> Keeping RecentsView overscroll similar to S, by created a custom EdgeEffect
Bug: 183966408
Test: Manual
Change-Id: Ia547cf14ea315468b12a4ff5f389ac2d2beceafa
- Use TaskView's actual position with grid/fullscreen translation considered for taskPosition calculation
- Shift taskPosition by midpoint scroll, and no longer assumes midpoint is on middle of the screen
- Handle situation that TaskView is on left/right of midpoint, making the calculation generic to be able to handle grid situation
Bug: 175939487
Test: Launch modal view with wide/, RTL/non-RTL, orientation/simulated landscape combinations
Change-Id: Idd0cc9c5e24f453d830e1420319a38d3d784270d
> Merging overview and all-apps scrims into a single View
> Decoupling TaskMenuView from taskView
Bug: 184676497
Test: Manual
Change-Id: I49f7249eaa2a800054385ab8e73a441d6a1b5e16
- Grid scaling has problem that scales task icon and menu, which makes it hard to control icon size and text size in the manula
- Replaced the whole concept with dedicated Task size calculation in grid layout
- Support different icon size in TaskView in grid and removed task_thumbnail_top_margin
- Removed grid progress in TaskViewSimulator as well
- Refactored how ClearAllButton scroll and translations are calcualted to align clear all properly in grid
- Make page center calculation aware of PagedView pivot and scaling
Bug: 174464863
Test: Manual on two screens
Change-Id: I47b13ef6e55c6e16c52ea04225f5bde02ed82fc2
TODO:
* Extract out common elements in TaskShortcutFactory.MultiWindowFactory
for commonalities between new and old way of
invoking split screen
* Integrate with WM APIs (b/182002789)
* Write tests for SplitSelectStateController
Bug: 181704764
Change-Id: Ice35adb4ea82897f5e2433dc9b93a549f3d511b5
- Introduced gridProgress to RecentsView/TaskView ofr animating into grid
- Introduced gridProgress dependant translation and scale properties in TaskView
- Animate running task into grid with TaskViewSimulator
- Remove overview actions (for now) but keep clear all button in large screens
- Adjust ClearAllButton translation to acoomodate for grid
- Use screen width +-50% to calculate task visibility
- Use the position where TaskView is on screenEnd as pageScroll
- TODO: Handle separate recents activity
Doc: go/foldables-launcher-overview
Video: http://dr/file/d/107Aydii1LoFCwP63nWG3Twr2PBDE5ZgD/view?resourcekey=0-aUjdnx8ezimS9tmAgao9ag
Test: Test Launchering overview and launching overview from apps with folloiwng combination:
- large / small screen sizes
- portrait / landscape
- thumbnails from different screen sizes / orientations
Bug: 174464863
Fixes: 181509346
Change-Id: I4b691cde774f2e37532b68ba83c6eed399f2332e
Previously, we were using scroll direction POSITIVE as a catch all
to mean "up" but in seascape, we actually want NEGATIVE. Added
getUpDirection() to capture that. Tried to clarify the code a bit
by putting all the methods used solely by TaskViewTouchController
together with documentation. It's still pretty confusing and feels
redundant, but couldn't think of an obvious way to simplify.
Test: Swipe up and down on a task in all permutations of:
- 3 button mode
- Gesture navigation
- Portrait
- Landscape
- Seascape
- LTR
- RTL
- Home rotation allowed
- Home rotation disallowed
Fixes: 174009771
Fixes: 173567204
Change-Id: Id0f8d6f4365d888eb46182d8544d18206795dfb8
Test: Set TaskView#EDGE_SCALE_DOWN_FACTOR = 0.2f, then swipe
down on the centermost TaskView; ensure it fills the screen.
Alternatively, touch and hold the nav bar and ensure there is
no jump in scale on the app window.
Fixes: 169259407
Change-Id: Ib3cfba6ebafbcb90de9c6b1ab79f53605d995321
Now recents view follows your finger all the way to the top of the
screen. Specifically, your finger tracks the bottom of the window
until resistance starts (when RecentsView is at 75% scale), then
we add translation to compensate for the slower rate of scaling
down, such that your finger slips to the top of the window by the
time it reaches the top of the screen.
Also reset this translation back to 0 in the state handlers.
Bug: 149934536
Fixes: 158701272
Change-Id: Iaee58da758d422f0173c29d002f5c451ce0c1809
Before, the adjacent tasks were coming in from the top and bottom
of the screen rather than the sides.
Bug: 149934536
Change-Id: Id6e57dcbc1967d70869df06068d25717de116934
Instead of calculating an overall distance for tasks to translate
based on RecentsView width, calculate the distance for the tasks
to the left and right of the midpoint based on how far the first
adjacent tasks in those directions are from being offscreen.
Changes made to make "distance to offscreen" calculations possible:
- Update TaskView curve scale to reach final scale as soon as it is
completely offscreen. Before, it would reach its final scale just
shy of that point (calculations were off).
- As we update RecentsView scale, calculate how much the new scale
will push out tasks that are just offscreen.
- With both above, we can calculate the scale and position of a
TaskView such that it is just offscreen, and interpolate
between its current position and that position.
Tests:
- Task comes in immediately when quick switching from home, and
doesn't shift as you swipe directly upwards.
- When swiping far up from an app, tasks come in from all the way
offscreen, and cover distance appropriately (e.g. if you're
scrolled a bit to the right when you pause, the left adjacent
app will move faster to cover the farther distance).
- Task modalness: entering Select mode now animates adjacent tasks
at the same rate as the scaling up, because they move only the
distance needed to get offscreen (before they moved way too far
and thus seemed to be much faster than the rest of the animation).
Bug: 149934536
Change-Id: Ie3fffe0e5c304cb16e7637f058f5ce72cee40aeb
Merged-In: Ie3fffe0e5c304cb16e7637f058f5ce72cee40aeb
Instead of calculating an overall distance for tasks to translate
based on RecentsView width, calculate the distance for the tasks
to the left and right of the midpoint based on how far the first
adjacent tasks in those directions are from being offscreen.
Changes made to make "distance to offscreen" calculations possible:
- Update TaskView curve scale to reach final scale as soon as it is
completely offscreen. Before, it would reach its final scale just
shy of that point (calculations were off).
- As we update RecentsView scale, calculate how much the new scale
will push out tasks that are just offscreen.
- With both above, we can calculate the scale and position of a
TaskView such that it is just offscreen, and interpolate
between its current position and that position.
Tests:
- Task comes in immediately when quick switching from home, and
doesn't shift as you swipe directly upwards.
- When swiping far up from an app, tasks come in from all the way
offscreen, and cover distance appropriately (e.g. if you're
scrolled a bit to the right when you pause, the left adjacent
app will move faster to cover the farther distance).
- Task modalness: entering Select mode now animates adjacent tasks
at the same rate as the scaling up, because they move only the
distance needed to get offscreen (before they moved way too far
and thus seemed to be much faster than the rest of the animation).
Bug: 149934536
Change-Id: Ie3fffe0e5c304cb16e7637f058f5ce72cee40aeb