* No more split left/right/top, only have
splitscreen and icon shows vertical or horizontal
split windows
* Replace existing split icon for FreeForm
Fixes: 264930810
Test: Tested landscape and portrait, workspace,
overview, allapps
Change-Id: I443f93b6b01760b726bf9f024fb1324fdf0ed03c
This patch makes it so that app icons no longer jutter uncomfortably when staging and confirming a split from home.
The problem occurred because I used Math.round when calculating the position at which to center the app icon within the SplitPlaceholderView. When an inexact integer is used to calculate the x and y position on every frame, it creates juttering, especially when numerical values are small.
Solved by removing Math.round and using floats going forward.
Fixes: 262308025
Test: Manual
Change-Id: If91d1d3ee52652c155ed7e4e1d4f4620fdc41cc9
* Instead of basing calculations on the TaskView view,
use the TaskThumbnailView as the anchor.
This helps us prevent having to re-calculate positions
that were already done to layout the thumbnails
* TODO: Gracefully handle re-positioning task menu view
on rotation
Bug: 249693334
Test: Manual, opening task menu view in
land/seascape in portrait, w/ and w/o home rotation
Change-Id: I02da96d2735657d5340e23056de69392ff8452c4
This patch makes it so that the split placeholder uses only one inset for buffering the top of the icon: either the default split placeholder inset, or the device's built-in screen inset.
Currently, when we determine the size of the split placeholder, we add the placeholder's default inset to the device's built-in screen inset (camera cutouts, etc.). On some devices, this causes a very large combined inset, and it doesn't leave enough room for all the other UI elements, especially when 3-button mode is active. This patch cuts out one of the insets by selecting only one of the insets to respect (the larger one).
Fixes: 241164191
Test: Manual, checked all emulated inset types on a variety of screen sizes
Change-Id: Ica0e791bf4b8b757ad3fb87ab1cf3105b97a61dc
* Silly us, we forgot that int casting always floors.
Math.round() does a mathematical round.
Fixes: 248575056
Test: Wallpaper no longer bleeds through on split
animation.
Change-Id: I068c030ce6b86fc12faee7778c0d87a0d5aea487
This change updates the Overview > OverviewSplitSelect animation to the latest spec. This is a re-upload of a previous change, ag/19464657, but no longer will cause the b/241165022 issue.
Includes:
- New timings
- Task thumbnails slide in with an "overshoot" animation
- Icons fade out and fade in appropriately
- SplitInstructionsView has a new compound "unfold" animation
Bug: 236760307
Test: Manual on tablet. Made sure the b/241165022 issue is fixed.
Change-Id: Ia22f6b6d7b9474b782e693fae2320a34a2985b18
* Use consistent divider calculations in
different methods
Fixes: 245610772
Fixes: 218784487
Test: Open task menu view in split pair in landscape/
seascape/portrait, real and fake.
Change-Id: If1bbc7a0d4f1767584d0fc8cf549130f35b8e4a3
The animation from Overview to OverviewSplitSelect is now updated to the latest spec. See bug for details.
- New timings
- Task thumbnails slide in with a new spring animation
- Icons fade out and fade in appropriately
- SplitInstructionsView has a new compound "unfold" animation
Bug: 236760307
Test: Manual on tablet and phone. Looks good on both true and fake orientations.
Change-Id: If98d4464aa51c876d79bee9672279992a2cf9026
This update slightly changes the calculation method for Overview UI placement, in order to line up better with spec. (The previous calculation caused a small 30dp divergence on tablets.)
Bug: 236760307
Test: Manual by measuring pixels and comparing to spec
Change-Id: I94e9e7b5a6a24c37693425ac8ec71cd066003658
The animation from OverviewSplitSelect to Home is now updated to the latest spec. See bug for details.
- New timings
- FloatingTaskView now translates out, instead of fading
- FloatingTaskView and SplitInstructionsView now disappear concurrently with the rest of Overview, instead of afterward
Fixes: 236761067
Test: Manual on tablet and phone
Change-Id: Iaa1c804a60859232f331950098b67968cc187e82
Fixes a bug where the user would see the splitscreen thumbnails swap position when entering Overview from fake seascape.
The bug arose because Overview's layout in fake seascape previously respected the primary-top secondary-bottom rule for placing splitscreen thumbnails. Actually, this needs to be flipped to preserve left-right orientation: If the user sees Task A on the left, it should always be on the left no matter how they rotate their device.
Fixed by swapping thumbnail and icon positions in SeascapePagedViewHandler#setSplitTaskSwipeRect() and setSplitIconParams(). Fake seascape will now show primary thumbnail on the "bottom" of the screen and secondary on "top."
This patch also corrects a minor calculation bug affecting icon alignment.
Fixes: 221133532
Test: Manual
Change-Id: Id587cf3815e64792d758d0e352da1e1e38cb4348
* Use "select" when in the split screen
invocation process
* Drop usage of "staged" except when defining
constants
Fixes: 233006032
Change-Id: I809f0e1e9742aa6b6b09ad8731896ad3f0c9deb0
* If the starting point is greater than that of the current
device's width (in either positive or negative direction),
reset the starting rect to be fullscreen task bounds
* More details at b/228829958#comment12
Fixes: 228829958
Test: Reboot device and swipe up from home immediately,
app doesn't fling from the side.
Tested with portrait and landscape launcher.
Tested with fake landscape launcher.
Change-Id: I6ea24e30e9de5716b7830f487b2ed63f56598c50
The instructions for how to perform a splitscreen operation, previously conveyed through a disappearing Toast, are now conveyed through a custom View object.
Fixes: 219987907
Test: Manual
Change-Id: Iff2bb6e334e0325e8a091d76a5f9b8767071365f
Fixes a bug where switching the phone to RtL caused Overview's split staging icon to be placed incorrectly.
The bug was caused by the fact that FrameLayout margins were not working consistently in RtL. This may be another bug; more investigation required (b/201920967).
This fix makes it so that the icon is positioned using setX and setY rather than margins.
Fixes: 227372971
Test: Manual
Change-Id: I6e5371d20e8e2e4e6f41ba93d0dfa36ed085c103
Fixes an issue on some devices where initiating a split in Overview would cause an icon to be placed partly under the camera cutout.
Fixed by adding some padding to FloatingTaskView#mSplitPlaceHolderView, so that it always respects the device's insets.
Fixes: 220997064
Test: Manual
Change-Id: I7270bde3320f562519ea8e36a38e49609e0d6cd7
- 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