Test: Drag a test widget around and observe local extract color
is applied.
Bug: b/182282587, b/182816217
Change-Id: If63a9d91ceb2102d5d913bca85997b8be07b1adf
- 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
This is a preliminary work for local color extraction. In order to
apply local colors extracted from wallpaper to AppWidgetHostView
during drag, we need to hold a reference of the dragging
AppWidgetHostView.
In this CL, the following changes are made:
1. Instead of using bitmap image directly for icons, folders, shortcuts,
legacy widget drawable preview, a BitmapDrawable wrapper is
introduced.
2. Introduce a WidgetHostViewDraggableDrawable which draws
LauncherAppWidgetHostView directly to canvas. No more bitmap
generation overhead.
3. Remove drag outline from the drag logic because this will be replaced
by a new grid color hint UI: https://screenshot.googleplex.com/7jBEVeuxFecFKKT.png
Test: Add: add widgets, shortcuts from widgets tray.
add icons from all apps.
create folder.
Drag: drag existing widgets, shortcuts, folders and icons around
Bug: 182282587
Change-Id: Ia45ff756ea5bb80cf0761f0727a9453d50c204c0
Test: go to all apps, ensure no bottom insets/limited nav bar
protection; go to overview, ensure no extra bottom padding
Bug: 171917176
Change-Id: I09dc589e1cb8d3b673bf2b38e42284557413e011
When you long press on the taskbar hotseat item, the following happens:
- We start a system drag and drop with an invisible drag shadow
- We create a new DragOptions with the simulatedDndStartPoint set to the
drag down position, and tell Launcher to use that for the next drag
- We perform a long click on the equivalent Hotseat item in Launcher
- We pass the drag events of that operation to Launcher's DragController
This allows Launcher to handle the entire drag operation, including the
pre-drag (with popup), and taskbar already hides when the drag starts.
Test: Long press items in taskbar hotseat, able to drag them to workspace
Bug: 179886115
Bug: 171917176
Change-Id: I576b80cb1bd0225cdc91cf7689fdee0481265109
- 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
I will use the newly created LauncherAppWidgetProviderInfoTest in a follow-up CL to add tests for the newly added widget sizing APIs.
Test: Automatic: Ran all robolectric tests in launcher3,
Manual: Added a widget, edited the widget, removed the widget
Bug: 179807199
Change-Id: I540b2dbe284c6eb5aa2466a1d13a9581ee59425b
=> The entire DragLayer is translated during the -1 transition which creates a janky looking edge at the top of the screen
=> By bumping the scrim up a level, we avoid this
=> Separated WorkspaceAndHotseatScrim into two separate scrims, since only part of the scrim needed to be bumped up to a level. Further, it was an overloaded class.
=> We had previously been implicitly relying on the fact that the scrim was rendered in the Workspace parent; we need to make sure to propagate workspace inavlidations to the container of the scrim. While things would still work without this change, it's more correct to leave it, as we no longer assume a hierarchy for functinoality.
Bug: 178215332
Test: manual verification. See video in bug.
Change-Id: I0a76ddf35ceea8c9635367f69380ef24f42e9479
Adding support for bulk removing items from a folder icon.
This fixes workspace item removal when a folder gets replaced
to an icon during the delete operation.
- Lets say user has a folder with the same app twice.
- User disables that app.
- Launcher removes all shorcuts of that app
However, because we call "replaceFolderWithFinalItem" during
this removal, we end up creating a new shortcut that does
not get tracked by the removal, so the user is left with
an enabled icon of the disabled app.
Bug: 162378169
Test: manual test, repo steps in bug
Change-Id: Iaf6550894c156b3b5ec2a5aa58bab76a4a28819e
1. Changed Preload Icon UI to be grayscale while the app is not startable.
2. Added progress bar for when app is installed but still ownloading.
3. Updated Preload Icon progress and click handling to use new incremental api.
Progress bar color updates will follow in a separate CL.
Demo: https://drive.google.com/file/d/1H1EvtTorLeJwC1eiq10tm-TT81YZ6osk/view?usp=sharing
Bug: 171008815
Test: manual
Change-Id: I5874a5146d79a8c91d7d90ff0b9c1c427a3c95dd
In order to experiment with presenting more predicted content to the
workspace I have added a flag to expand smartspace to two rows.
This CL does not include any app relocation. If an app lives in a space
the expanded smartspace will occupy, it will be removed from workspace.
Change-Id: I38354dc81a34a495828cf7a69ddb04cc137e2e4e
Previously we only allowed touches on the hotseat (due to it being
in the shelf in Overview); now we allow touches anywhere if we are
not in an overview state.
Test: enter overview, swipe up to home and scroll workspace or tap
a workspace icon during the transition
Bug: 169052350
Change-Id: I59ee695ba9cb6f5fddd8e41c5796cdba6b3d2112
This prevents a conflict between the scroll animation
and layout transition caused by removing the screen.
Since the extra screen is at the end of the workspace,
this most commonly (only?) causes issues in RTL, as
everything shifts to the left to fill the void of the
empty screen. See bug for example video of the issue.
With this change, the removal of the empty screen
happens after Launcher finishes transitioning back
to NORMAL state after dropping an icon/widget,
rather than in onDragEnd.
Note: There is a similar issue when placing a widget
in RTL (even if not switching screens), but it's not
made worse by this CL. Filed b/166531479.
Demo:
https://drive.google.com/file/d/1JTP81syjoBFe3_N2SOZHP5r5_RoCUWan/view?usp=sharing
Fixes: 163382092
Change-Id: I55ed5af8e1d80dcc0d1b6502c3c5b068dc6f8722
Test: Scroll to workspace page 2, then swipe up from the nav bar;
ensure that the page indicator fades in and scrolls to page 1
Change-Id: Ie0157c8e67b94509d3817f7e160d26f505185bbb
These items get updated automatically during various model tasks.
Also simplifying the pinned shortcut state, by calculating the
list of ppined shortcut on demand, instead of storing a refCount.
Bug: 160748731
Change-Id: I3169d293552b05b4f4d6c529397fbc761887a282
Doing this at the root instead of individually for all added
animators ensures none fall through the cracks.
Fixes: shelf moving too quickly in 2 button mode
Change-Id: I0de1ba9cee3fb8f1d6161371625d97e4b2305129
SearchResultContainer represents apps rows displayed within QSB search results for both default scenario(without search term) and actual search result(with search term).
SearchResultContainer is used for both homescreen QSB and all-apps QSB.
Follow up CLs will add searchOrigin and queryLength in SearchResultContainer
Bug: 152978018
Change-Id: Id5f96490686c4141e3e6b2516907ac0505a777e6