- Removed overscroll checking in switch access, as overscroll isn't supported via snapToPage
- Don't show forward/backward action if no further scroll is possible
- When scrolling right in overveiw grid, snap to the next non-fully visible task
- When scrolling left in overview grid, snap to a position that next non-fully visible task is on the left of the screen
Fix: 204162346
Test: Use switch action in Workspace/Recents with and w/o RTL
Change-Id: I0d4f201edf2da543703e88420e6f3255fb2ba16f
- 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
Add an extra check to the PagedView, before triggering the haptic
callback, to avoid triggering this when the scroll happens
outside an actual scroll action (e.g. some setter methods that update
the scroll state).
This was triggered on some calls to setCurrentPage, that was
snapping the current scrolled page and triggering the
View.onScrollChanged method.
Fix: 201237536
Test: manual
Change-Id: I9b29981dba408493c78873aea42d8615ea7573a0
Merged-In: I9b29981dba408493c78873aea42d8615ea7573a0
(cherry picked from commit bff03e2d0f)
This creates a new padding file that bring some foldables up to spec
with VisD. For 2 panel layouts it now uses workspace margin instead of
cell layout padding.
Bug: 191879424
Fixes: 200035429
Test: checking paddings in HSV
Change-Id: I11b8e1afd76f535368d4c26e31630ce496171e13
Test: on a device with 2 panels, workspace page indicator width reflects number of needed scrolls rather than number of pages.
Fixes: 200607741
Change-Id: Ic2d0bdc644a15944c2d69a832068889071dc25e2
This ensures that we don't inadvertently update mCurrentPage to be
mNextPage in computeScrollHelper(), which would in turn mess up
calculations such as RecentsView#getHorizontalOffsetSize().
Also removed resetNextPage parameter from forceFinishScroller(), as
resetNextPage was always passed as true anyway.
Test: Swipe up and to the right to home, ensure adjacent page goes all
the way off screen
Fixes: 199927699
Change-Id: Iee1ffac10e5195f0c3a124a23b06d5411ecd7ba2
Haptics introduced at the key moments:
- Task scroll in overview or quick switch, trigger when a new task comes
to the center of the screen;
- Task scroll in overview when overscroll animation is triggered;
- Task dismissed in overview;
There is also a configured min gap between two scroll haptics set to
20ms to prevent fast scrolls from creating a chain of cancelled effects.
Fix: 182382085
Test: manual
Change-Id: I43c0f8c879a06f317e8a660240dafb7f7abe79f7
- Remove all usage of LEFT_PANEL_ID and fixed left panel code
- For preview renderer, load screen 0 + screen 1 instead
- Added a split display specific default workspace layout, with a placeholder app to pass test before we implement page pairing(b/196376162)
- Known issue: If screenId 1 is deleted, right panel will disappear from Wallpaepr & Style because there is no screenId 1. Will be resovled after page pairing(b/196376162)
Bug: 175939730
Test: manual and TaplTestsLauncher3#testWorkSpace
Change-Id: Icac1c94165c14a49c17897c45355b6cdc4d87e91
Fixing unresolved comment: http://shortn/_YCaiPNApNc
Test: manual test with a game controller, check on both normal and two panel home
Bug: 187205980
Change-Id: I8cae48effcce852c85273f16d1107dec90ff6f51
Settings.Global.getFloat causes a Binder
transaction which breaks BinderTests.java
when running it from Android Studio.
Test: BinderTests.java
Bug: 187428578
Change-Id: I07ce2fe256dba0bfa98a5dade538d68e7ce357ff
This fixes 2 things:
- adding the correct space between pages as insets (eg camera) were
being discarded
- adding the space between pages instead of between panels as was before
This solution should work with more panels and don't create problems for
phones, where panels = 1.
Fixes 193194192
Test: manual testing in unfolded state in portrait and landscape, both
rotations
Change-Id: Ia3b148ceb773c6d5b6f8848ced07d7f9c1459e92
When two panel home was enabled in Launcher the items on
the left panel weren't able to get selected while on Talkback
because of an incorrect calculation in getScrollProgress.
Also the user was unable to jump to other workspaces by doing
simple one finger swipes because the page jump count was
only 1.
Test: manual
Bug: 174464170
Change-Id: I6cfe39b5059e8e7e7a32c9b0d372c658e796c3e8
- Calculate the diff to snapped page scroll and apply in onLayout, so tasks won't jump after dismiss when not in snapped position
- In grid, always keep the relateive snapped page unchanged to avoid jump
Bug: 188793333
Test: manual
Change-Id: Id11c2d700dc55440de39cc7409d06a712cedc9bc
- When calculating motion delta, it should consider the scale of pagedView
- Adjust significant threshold of tablet quick switch to 15% of page width (roughly 100dp)
Fixes: 188786242
Test: manual on quick switch
Change-Id: Idaa6c5b721decb573e97158c5fbcd67fa224f9d1
When the transition is canceled (e.g. when touching the nav bar during the transition), do the following:
- Abort the RecentsView scroll including the edge effects to ensure we get onSettledOnEndTarget() immediately.
- Jump to the current gesture end target state instead of the default rest state.
Test: Swipe up and to the left and hold to go to overview from an app, then swipe up to home during the transition; ensure that the touch down goes to overview rather than home, and subsequently that the swipe is respected and goes to home
Fixes: 189142339
Change-Id: Ie1d7dd05f45ab48968df7fdfd69fa1e1dda36d06
Add light LOW_TICK effects when the scrolling on RecentsView
snaps to a page, and a stronger TICK effect when the edges
absorb the scroll (by scrolling fast towards one of the edges).
Fix: 182382085
Test: manual
Change-Id: Ifb917ae499f73607707773f9870eb39cd6fe16ef
There's a logic which prioritizes the binding for the
current page and defers the other pages' binding.
If two panel home is enabled, we want to bind both pages
together. LauncherPageRestoreHelper has been created to
contain the logic for persisting restoring and calculating
which pages to load immediately.
Test: manual + run LauncherPageRestoreHelperTest robo test
Bug: 174464691
Change-Id: I57ac3f7150303b95b272e922f44bda26f9d5ce2a
- The system overscroller seems to take a long time to settle even
after the final position has been reached, so if that has already
happened and there is no edge effect, then just end the scroller.
- Remove unused code related to SmoothPageView
Bug: 184983443
Test: Quickswitch and ensure we finish the recents animation after it settles
Change-Id: I9fa72ddd6b6e0d38b6f622c776a2ac5f5b055760
When navigating in Launcher home using a controller,
the mCurrentPage variable isn't updated properly which
results in out of order navigation.
Test: manual
Before: http://shortn/_c8A8mKiplN
After: http://shortn/_ctxIaweqZY
Bug: 187205980
Change-Id: I9ff4019b608e999749c4d0835cc3ceb35be93a3f
> Using EdgeEffect in PagedView for overscroll
> Keeping RecentsView overscroll similar to S, by created a custom EdgeEffect
Bug: 183966408
Test: Manual
Change-Id: Ia547cf14ea315468b12a4ff5f389ac2d2beceafa
Calling cancelLongPress on all the visible pages when needed
and enabling hardware acceleration on them when a folder
animation is in progress.
Test: manual
Bug: 174464691
Change-Id: Ib11265abfd184fed41acc9a6347a32aec12895f2
- Align pages to right (instead of left) in RTL, to make scroll calculation for grid overview easier for out of orientation tasks
- Changed TaskView pivot direction to be consistent with page alignment
- Add scroll offset for ClearAllButton to align to left in RTL
- Fixed Workspace scroll issues in RTL, and removed needs to use panelCount when calculating page scroll
Bug: 175939487
Test: Test carousel/grid overveiw, Workspace, Folder scroll view for normal/RTL
Change-Id: Ic0ba88e5d58638e1149d97a68a978d80fbf26774
- 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
Recently we have added support for multiple panels
on the home screen but the current StaggeredWorkspaceAnim
logic only supports animation for the leftmost panel.
Test: manual
Bug: 183032642
Change-Id: I539e1c1a26292b75801eb3070e22f0fbde1ebc7e
Since we added support for multiple panels on the home screen,
we need to call cancelLongPress on all the visible pages not
just on the leftmost visible page.
Test: manual
Bug: 178582378
Change-Id: I88ded543a16b1bbf2a53a627e5725f68b42e742b
- Pagespacing set to 0 to have similar design to figma
- Added padding to left side of left panel and right side of right panel to match figma
- getPageScrolls changed to support two page scrolling
- validateNewPage changed so that only even indexed pages can be switched to
- getPageWidthSize added for measurements, it returns half screen width when two panel is active
- onMeasure changed to use getPageWidthSize
- panelCount has been increased from 1 to 2 when two panel is active
- add feature flag for two panel home
- shouldConsumeTouch changed so not only currentpage is checked but currentpage+1 screen as well
- add one more extra check for setDropLayoutForDragObject for currentpage + 2, next to right panel
- using new grid option for two panel home screen
Test: manual
Bug: 174464115
Change-Id: I1bad7eecc67f65fb833608744a5aa5aca65373b4
The fixes are:
1. For widgets shown in TableRow, aligns them center vertically.
This is useful when widgets of different height are shown in
the same row.
2. Remove background color from WidgetCell
3. Re-enable swipe in FullWidgetsSheet
4. Use the WidgetCell image as the single & long press area because
1. Previews are now scaled to their default size. The touch area
should already be larger for widgets that are bigger than 2.4
cells
2. WidgetCells also render description. If the user long press the
description area, the drag view will not align in the middle of
the user touch / drag area.
Test: Drag-n-drop widgets from FullWidgetsSheet, BottomWidgetsSheet
and pin widget flow.
In FullWidgetsSheet, swipe left and right to switch work /
personal tab.
Video: https://drive.google.com/file/d/1Ur7PwF1a7iwGGRTZczfc0BSVu-Ta6-Vm/view?usp=sharing
Bug: 179797520
Change-Id: I6fe4bc88d1e1b35b1819d8d7f046105f5ed27043