Adding new functions to CellLayout, two of them return a solution
(calculateReorder, getSimpleReorder) and the other one takes a
solution and animates that solution (void performReorder) and it can
either submit the solution or just show it for a preview.
Right now this two things are done under the same function:
int[] performReorder. The need to separate this two functions is
because to add this functionality b/188081026 which needs to find
soluion without animation and animation solutions that can be
calculated in another place.
Bug: 188081026
Test: atest ReorderWidgets
Change-Id: Ib519d4346f58f9b55aff5008cd3ccbcfe8443d2d
The wrapper class is created for further changes that will run the wrapped host in the background.
Test: N/A
Bug: 235358918
Change-Id: I9bd6fc2749c5d4a4d3391fb75d0c3ff1e13d17bf
mQsb is the name used for the first page pinned widget. This variable name is bad since in some launchers the first page pinned widget is a qsb but sometimes it is a smartspace. Renaming the variable to mFirstPagePinnedWidget is a more accurate name for this variable.
Bug: 251259222
Test: N/A
Change-Id: I6d3c74163995d2267510ee546924917062c4955c
For the new home gardening mode, we plan on not having a spring loaded mode where the overlay shrinks, so when we have the flag for home gardening on, we won't be having the workspace have the green overlay and the icons shrink
Bug: 251259222
Test: Hold on an icon in workspace to enter edit workspace mode, notice how we no longer shrink the workspace
Change-Id: Ibf1c38eecc117a838eca20a860d47c355955b513
I'm moving the LayoutParams to another file to start the decoupling
of the Reorder outside of the CellLayout.
Also, I change the name from LayoutParams to LauncherLayoutParams to prevent confusion with ViewGroup.LayoutParams making it explicit that this are different LayoutParams.
Bug: 188081026
Test: atest ReorderWidget
Change-Id: I92251c5540ffcf5ece7b933e6f6c836eb825c997
when dragging from search.
To scale the icon during dragging (instead of long press) I created a scale variable within DragOptions
so that right before dragStart gets called in DragController.java (in callOnDragStart())
the dragview scales before dragging..
* note: the scale from search is 1.687 and the scale from allApps is 1.107
- included searchResult and smallSearchResult
- Added animation for scaling icon (used Interpolators.EMPHASIZED 500ms as suggested by motion designer)
- Cancel animation when drag finishes
bug: 222666176
test: Manual - after: https://drive.google.com/file/d/1ZZHnXlzdTxlM-RUIdJ6EOYkPPg6tCUxC/view?usp=sharing
before: https://drive.google.com/file/d/1NpBz3kT_slHXtpXObr_G8K6SZYG9_bLX/view?usp=sharing
Change-Id: I01309a3be928987ba00422ad947b80a3df865973
In workspace, the page indicator dots end up in the bottom because we were missing a setInsets method (WorkspacePageInidcator.java uses this method to set the page indicator to the right height).
Bug: 249773534
Test: manual
Change-Id: I03636e28244f329b249453a6d22eb0ec7d85c45f
Before, the remote view for the widget in launcher is reused to generate a new preview. However, measuring the view without changing the scale would cause strange clippings. This CL sets the scale of the widget views by manually computing the size ratio.
Change ag/19572297 is necessary before a complete clean-up.
Test: Create a weather widget on first screen -> go to Wallpaper & style -> App grid -> tap on a different grid and verify that the clipping is correct
Fix: 228328759
Change-Id: I8242d3bcfcf30ec924552c1320e22f8a3592f1c1
When dropTargetLayout is null we don't need to
animate the widget to the closest location but
move it back to its original position.
Test: manual
Bug: 236135424
Change-Id: I50a793732cd9656605fdc9908f71ff0efa7e69e9
Fix: 233834133
Test: manual on handheld and large screens, until we have create a way to resize widgets in TAPL b/241385885
Change-Id: I427dfaadd219d33a5371c3ae92c4e2311d3d3c6a
Fix: 239963678
Test: Making sure the reorder preview is being drawn when moving a widget
Test: atest ReorderWidgets
Change-Id: Id32919821ac9177b3428261354d361c52b8f9e2d
This change is causing a merge conflict with ag/19441591. Hopefully only a cherrypick is needed.
Bug: b/218186980
Test: Manual Testing that Launcher3 compiles and works
Change-Id: Id85486ef763ce9a04b83fef44542b2eb3e0e599d
(cherry picked from commit c487e1b4c5)
This will help SysUI test team (who uses TAPL) to set up Gradle build for their tests.
Bug: 202567877, 234414088
Test: presubmit
Change-Id: I3d923ea4b54d1a4c3d2b345be09692727d30433e
Adding a third argument for the talkback string.
Fix: 230593493
Test: Move an item using Talkback and it should mention the row,
column and page where you can drop the item.
Change-Id: Id3d4435e9ef3348278643e6e2a1cd1e8bf5157b7
In the past we've seen a WorkspaceItem disappeared from the workspace
but wasn't able to determine why it was removed. This CL includes the
reason why it was removed in the error log, which hopefully would help
us debugging similar issues in the future.
Bug: 231239260
Test: make
Change-Id: Iba3d57568c9b3e011a6b65b26f0d4170d42fe1a5
This removed unnecessary componentName lookups when it
is not required. Many checks just rely on IDs and
userHandle
Bug: 231153610
Test: Presubmit
Change-Id: Ief93954abc5861062a9f55dc2ef181d3de106c62
- Avoid overriding interpolator in AllAppsTransitionController.setStateWithAnimation as it's no longer needed and it'll wrongly override interpolator for ANIM_ALL_APPS_FADE
- Override ANIM_ALL_APPS_FADE to FINAL_FRAME in QuickstepAtomicAnimationFactory for tap deadzone to dismiss animation, also added EMPHASIZED_ACCELERATE for the dismiss animation
- Tuned dismiss animation across form factors to 300ms
Fix: 220336617
Test: manual
Change-Id: I4b3e827b503dcb1dd39f0bd99d4c1dd5ffdba0f3
- If a dragged item is not over a valid drop target
then we don't highlight anything and on drop we move
it back to its original position.
- Instead of checking if the dragged item is over the
hotseat view, now we check if the item is over the hotseat
shortcuts.
- Smartspace is a dead zone
Test: drag items from different workspaces, allapps, widget
picker etc. to all parts of the screen and verify which
view is targeted and where the item gets dropped.
Check on phone/foldable/tablet.
Bug: 228201267
Change-Id: I18de576ea300d58ae645e511b238e0b946b5595a
Creating an AlertDialog when the disabled reason of the shortcut is DISABLED_REASON_VERSION_LOWER, which happens when the backed-up shortcut was created from an application that has a version higher than the one installed on the device. The AlertDialog will direct the user to the play store and update the application.
Test: Manual
Fix: 224796975
Change-Id: I0125fada60b48176775de6782ba03ee6790904aa
Use 15% of the screen width instead of 40% of the page
width currently used for phones.
Test: try page snapping on Launcher home
Bug: 213305066
Change-Id: I6a525100bf942c5089f580a27250c425ca95cf00
Please see the related CL in LauncherLilyGoogle where pagination is
implemented as persistent dots.
Bug: b/218187058
Test: manually test thet Launcher3 features work correctly
Change-Id: Ic20aa92249b1bbe3c4ab7810683b54648a181722
This change fixes a bug where, after a user drags and drops a
predicted app from the all apps page once, dragging that item again
results in the "Remove" drop target being shown rather than the
"Do Not Suggest" drop target.
Bug: 221057278
Test: Verified correct drop down targets were present after fix when
dropping all apps prediction item on workspace multiple times in a row.
Change-Id: I95940eeebbd547861fcdfbb5d02769b82446184d
For the 4x5 grid we add insets to the widget and the
animation wasn't accounting for it.
I'm using this shell function to quickly change the
animation speed
```
function anim-speed() {
adb shell settings put global window_animation_scale $1
adb shell settings put global transition_animation_scale $1
adb shell settings put global animator_duration_scale $1
}
```
anim-speed 1 # for regular speed
anim-speed 10 # for really slow speed
Fix: 194227752
Test: Put down a widget in 4x5 and the animation should match,
sometimes is to fast but you can slow the animations with adb and see
the difference
Change-Id: I182729de39c0d0b12231d07e337dddca6fccf5c0
Test: manual
Revert submission 17004675-edit-state
Reason for revert: b/226274309
Reverted Changes:
Ib50509b6f:Adjust edit state drop targets per device type and...
Id1817cd3c:Adjust edit state drop targets, workspace scaling,...
Change-Id: I22863d7735f49f6a040a17cf56cc66f20a3e0986
=> we want to use the extremum of finger location and object
center for snapping to a new screen (max when snapping to right,
min when snapping to left)
=> when selecting a panel within the current screen, we want to
rely strictly on the object center to determine selection; there
is plenty of space to be consistent here, and extremum logic
could cause thrashing back and forth with no page movement.
Test: Manual. See videos in b/221104663. On two-panel and one-panel
test dragging a widget between different screens with
different starting positions of where the widget goes down.
Bug 221104663
Change-Id: I8f0f13f07b753752087a90c4bacb76cfbf7aa5bf
- Divide total pages by panelCount if two panel is active
- Increment target column when moving an item to right panel
Test: manual
Bug: 200009004
Change-Id: Ia8d2d760dc5e8b413e5b1150c049f7fa3ec26513
- Fixed icons disappearing when initiating dragging
- Fixed incorrect icon location when initiating dragging after rotating the screen to an orientation other than what launcher started in
Fixes: 215418478
Fixes: 214025075
Test: dragged icons from the workspace and taskbar
Change-Id: I848138af28802f7d806708c77c25b8de307c70d8
- Added numSearchContainerColumns in grid-option to control search container's width, defaults to numColumns if not specified
Bug: 210127246
Test: manual
Change-Id: I0c2594f0eeab8844dcff9468e603282a09fae0bd