Commit Graph

44 Commits

Author SHA1 Message Date
Kateryna Ivanova
7120373bbc Migrate Interpolators from Launcher3 to the public animation library
Test: atest
Bug: 271850966
Change-Id: Iba999f2e753764a37d35e508e707df02388432e9
2023-05-30 07:20:38 +00:00
Jordan Silva
567372fbda Fix text sizes and alignment in drop target
Drop target button texts are being resized incorrectly.
When both buttons are visible, the text is considerably smaller compared
to only one visible button. This happens even for the default display and font scale 1.

Fix: 271279172
Test: manual. test all combinations of display size and font size.
Test: HomeScreenEditStateImageTest
Change-Id: Ib001dcf8b096c65b138946bdad49cf8199fb5b1d
2023-05-02 14:57:49 +02:00
Schneider Victor-tulias
fff7cef9f1 Remove unused debug logs
Removing debug logs for bugs that have already been closed. These logs are filling up the logcat buffer and impeding in other test investigations.

Flag: not needed
Test: Tapl tests
Bug: 260260325
Change-Id: I4d69b904f2ea79d758cf6bef7d90d172f2eb2a91
2023-04-25 11:00:37 -07:00
fbaron
e74256bba8 Remove unused code for old mult select design
We previously made a few CL's guarded under flags for the multi select feature. We ended up having to halt progress on this, and now that we're starting again, the design is different and we are using a new flag. Here we get rid of the unused code and flags

Bug: 277617038
Test: Verify everything still works normally, everything was guarded under flags that were off so there shouldn't be any changes
Change-Id: I2f57d1f67aa2a8cf83287f6f3df9fa6c46dbf0ab
2023-04-10 14:55:41 -07:00
Federico Baron
626d51c68c Move DropTargetBar to bottom
The DropTargetBar has "Remove" and "Uninstall" buttons for workspace edit mode. We are moving them to the bottom for workspace home gardening

Bug: 251259222
Test: Turn on flag HOME_GARDENING_WORKSPACE_BUTTONS and enter spring loaded mode (edit workspace), notice the buttons are now at the bottom
Change-Id: I739162bdd5764dd8367a63a67fae0fe5c7329b0a
2022-10-27 14:18:00 -07:00
Pat Manning
e63dd25a54 Use full screen width for drop target buttons to support higher screen densities from truncating text.
Scale oversized text down if after all computations it will still be truncated at higher densities.

Fix: 239401464
Test: manual. To follow up with screenshot test: b/241386128
Change-Id: Ie088d0631b0d13beb2d9f9d5396a56f7b971dee1
2022-08-30 14:57:42 +01:00
Pat Manning
5f74bfd76d Refactor DeviceProfile tests based on dump() and use real device dimensions for tests.
- Added roundPxValueFromFloat when converting dp/sp to px to deterministically round up values around .5

Fix: 240133465
Bug: 237542518
Test: DeviceProfileTest.kt
Change-Id: If4239f714487fe5bf2ef44274e2ce415bd75c86d
2022-08-01 17:54:43 +00:00
vadimt
f6ef879cf4 Moving all sources that are shared between Launcher and TAPL in one directory
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
2022-07-27 20:18:46 +00:00
Pat Manning
e3d74b496e Hide both drop target icons if either text goes to two lines.
Fix: 235088140
Test: manual
Change-Id: I582b8b771d859402b932193251690e5a4ffecbae
2022-06-08 16:33:05 +01:00
Alex Chau
5b0193026a Center drop target button alignment across devices
- Partial re-land of http://ag/18520765

Fix: 229789612
Fix: 231711806
Test: manual
Change-Id: I0630c19901435a30379596378e9c0cd4beb2e764
2022-05-24 18:31:57 +01:00
Alex Chau
906d882f91 Update drop target button alignment across devices
- Partial re-land of http://ag/18520765
- Layout the buttons from center of screen for two panels, or from center of workspace for all other cases

Bug: 229789612
Fix: 231706480
Fix: 232063941
Fix: 232283628
Test: manual
Change-Id: Icbc9e2a19140ce3127d5dfe9f798a8ada336cea8
2022-05-23 15:08:52 +00:00
Pat Manning
b29dabce18 Revert "Update drop target button alignment across devices."
This reverts commit 27bfcaa651.

Reason for revert: b/232636570

Bug: 229789612
Bug: 231711806
Bug: 231706480
Bug: 232063941
Bug: 232283628
Change-Id: Ic83515173f4a64228a80f63d75db938243cbf625
2022-05-20 18:20:26 +00:00
Pat Manning
3c0f4c156d Bound drop target layout values to left and right.
Test: manual
Fix: 232636570
Bug: 233225825
Change-Id: I388cb3407cb9f887ccc222f4804636f9f7651884
2022-05-19 18:48:14 +01:00
Pat Manning
27bfcaa651 Update drop target button alignment across devices.
Fix: 229789612
Fix: 231711806
Fix: 231706480
Fix: 232063941
Fix: 232283628
Test: manual.
Change-Id: I75d649b953ad1607dbba87a8f758884ff938b6dc
2022-05-12 13:49:58 +00:00
Pat Manning
a2e1499a2f Move spring loaded scale calculation to DeviceProfile.
Fix: 229838395
Test: manual
Change-Id: I6dbbc850e88aaacceb1363e342404b06104f8c10
2022-04-25 18:58:09 +01:00
Shikha Malhotra
80a315e50f Merge "Review comments followup" into tm-dev 2022-04-13 08:00:31 +00:00
Shikha Malhotra
f78da1bae3 Review comments followup
These are review comments followup from ag/17399997

Bug: b/218187058
Test: manually test thet Launcher3 features work correctly
Change-Id: I9865a37c1ed663370dc28e7678994f3d961e3cd1
2022-04-12 14:33:07 +00:00
Pat Manning
7013ee716d Add drop target button overlap correction to second button only.
Bug: 228311837
Bug: 228311837
Test: manual.
Change-Id: Ib9256deadd58c7350143221bf98c79415aaf9bc4
2022-04-12 12:54:15 +01:00
Sebastian Franco
d2d8e97a65 Make the text for the drop target buttons fit if it's too long.
The text "Don't suggest app" is too long when the device language
is GE or JA, or if you make the text bigger in settings.

Before truncating the text completely we are going to try to make
the text smaller until it gets to a predefined value
(button_drop_target_min_text_size).

Test: Change the language to German (Deutch) and install a new app and drag it to the workspace to see the button "App nicht vorschlagen"
Test: Also, a nice way to test is to go to SecondaryDropTarget#setupUi and hardcode the option to always show "Don't suggest app"
Fix: 221480721
Change-Id: I99def4e23cd17109a297aecaa620cef7a0d137e7
2022-04-07 16:39:29 +00:00
Pat Manning
de25c0db36 Adjust edit state drop targets and workspace scaling per device type and orientation.
This is a partial revert of ag/17540098

Bug: 202971709
Test: manual
Change-Id: I0a642f932afd75e47ce11a2c1ee94643d1a67e0c
2022-04-05 20:56:03 +00:00
Pat Manning
e372366bb3 Revert "Adjust edit state drop targets, workspace scaling, and m..."
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
2022-03-28 08:24:54 -04:00
Pat Manning
1acf2b18af Adjust edit state drop targets, workspace scaling, and margins per device type and orientation.
Bug: 202971709
Test: manual
Change-Id: Id1817cd3c7e7bfa5b0aa8aa20565b791ad871f64
2022-03-18 17:43:28 +00:00
Vadim Tryshev
8629be753f Partially restoring reverted logging
ag/15858126 slowed down everything so
that the flake stopped to repro.

Attempting to reintroduce a more
lightweight logging hoping that the flake will
keep reproing.

Test: presubmit
Bug: 195031154

Change-Id: Ib533c22253e367cced1680a6f4d6736087f0837a
2021-10-26 20:00:55 +00:00
Vadim Tryshev
a666b8f5da Revert "More logging for drop bar not appearing for dragged widget"
This reverts commit 876c15aa1f.

Reason for revert: After this CL, the flake disappeared. Revert to see if this was because of this CL.

Bug: 195031154
Test: presubmit

Change-Id: Ic3c54900927615338d9510ad179e87ee43133e4e
2021-10-11 22:10:50 +00:00
vadimt
876c15aa1f More logging for drop bar not appearing for dragged widget
Test: presubmit
Bug: 195031154
Change-Id: I28673866e2c893584402081b0f61acfa2a9c88c1
2021-09-17 19:43:07 -07:00
vadimt
89d9423321 Logging for drop bar not appearing for dragged widget
Test: presubmit
Bug: 195031154
Change-Id: I19494fc3d6d9db252570697c057fdee7f7d44521
2021-09-01 12:33:00 -07:00
Alina Zaidi
1b5efa3216 Reduce margin for DropTargetBar to avoid buttons to be truncated.
Bug: 187036287
Test: Tested manually by QA testing team on 4X5 grid size
Change-Id: Iaa4cd3e464ccf50427a5aa96d97093601e1d2948
2021-07-01 09:50:46 +01:00
Alex Chau
a02eddc144 Handle config changes in Launcher
- This is practically a revert to http://ag/c/13687966/5 and refactored to use DisplayController.DisplayInfoChangeListener
- Make Launcher handle size and density change so transition is less janky when screen size changes
- Added fix in RecentsView to update state and TaskView when display profile changes
- Removed 720dp specific resoureces
- Removed unused widget_section_indent
- Removed unnecessary all_apps_background_canvas 600dp override that is not needed in AllApps+
- Moved remaining dp specific into DeviceProfile
- Simplified allowRotation logic to use single variable in DeviceProfile to determine if allow rotation is enabled by default

Fixes: 180803696
Test: manual
Change-Id: Iea0a7d1a0e14dc3613152dd3b3887450a2e1fc2f
2021-05-10 18:50:02 +01:00
Sunny Goyal
a4647b681f Adding support for keyboard based drag and drop
For keyboard DnD, we use Accessible DnD implementation.
A placeholder FloatingView draws the focus indicator
for the virtual views

Test: Visible
Bug: 178781566
Change-Id: I632fc7377dffa1e05e3f0a9c3ad18641deb5a1a4
2021-02-05 13:05:24 -08:00
Hyunyoung Song
497708c297 Clear should not show after Widget Configuration activity
Bug: 119847865

TL;DR;;
When configuration activity starts, simply make everything in drop
target bar invisible.

Change-Id: I37d067168368de4ee43b54e5dc95f958f5e94623
2019-05-01 16:33:31 -07:00
Sunny Goyal
58fa4b66ea Removing some redundant resource definitions
Change-Id: I68ae602116e6eb334dfce2a013fcc42068c464bf
2019-03-22 16:24:16 -07:00
Sunny Goyal
18d718492a Removing accessibility workaround for changing View visibility
Original change-id: I9a687a39a358441afd57c0c46b57399ecbf23c36

Bug: 76418647
Change-Id: I0800bd4f521e052f0a1229fe6b7ceafd1b0429ae
2018-03-28 10:32:19 -07:00
Sunny Goyal
7185dd63eb Changing the overviewState to show appsearch and floating header
Change-Id: I2cfd61cfc9978e4c8e4520f0f7217e49e7344c79
2018-03-19 20:02:34 -07:00
Sunny Goyal
f8d56fc8a1 Initial changes for handling configuration changes dynamically
Bug: 71709920
Change-Id: I88cf2229dea28d01c13a5a76d2290e91b07d095e
2018-01-31 15:20:30 -08:00
Sunny Goyal
7e2e67fd47 Adding isSeascape method to have a common place to orientation check
Change-Id: Ia61792b29ab0d1d74f76a8dfa53bbf968874dfaa
2018-01-26 13:47:32 -08:00
Sunny Goyal
d1b3f5cb38 Using same layout for drop-target bar in landscape and portrait
> Adding a tooltip on drag over when the text is not visible

Bug: 71709920
Change-Id: I1897a8dacd191fb1aeaec37f5d5c73c49517192a
2018-01-19 12:16:54 -08:00
Sunny Goyal
07b6929cd9 Removing layout handling in DeviceProfile and moving it to
individual views

Bug: 71709920
Change-Id: I8300fa7a84b31898bdb135d774cca576d2928525
2018-01-10 15:13:25 -08:00
Sunny Goyal
d0030b05f5 Adding placeholder method for compat implementations for Accessibility manager
> Moving some utility methods to the compat class

Bug: 69611105
Change-Id: Ide0cab0b926d7bc03617fc568d2a2b429ee00cd9
2017-12-08 16:09:45 -08:00
Sunny Goyal
5bc6b6f14c Consolidating various interpolators
Change-Id: I9588eee3552001b162a1e8d5ccefcfb44d221880
2017-10-26 16:38:55 -07:00
Sunny Goyal
0236d0b0ba Caching the uninstall disabled state for each userHandle
> Removing static access to varios drop targets
> Creating a cache at UI level with 5sec timeout

Bug: 67104426
Change-Id: Ide6e2e0c01606f9b5fb9281f95dc009873c18fb9
2017-10-24 14:55:54 -07:00
Jon Miranda
bfaa4a4edc Hides text on ButtonDropTargets if any of them are ellipsized.
This can happen on small devices or on devices where Font/Display size
is enlarged and when Developer Options is turned on when all three
options {Uninstall, Delete, App Info} are shown at once.

Bug: 64391860
Change-Id: If355d28087d53148114eb586efb3c26f158b3713
2017-08-24 16:27:30 -07:00
Sunny Goyal
0f76b56865 Refactoring FlingToDelete
> Moving all fling related logic to FlingToDeleteHelper from DragController
> Removing fling related methods from DragSource and DropTarget
> Moving fling animation logic from DeleteDropTarget to FlingAnimation
> Simplifying DropTargetBar to directly look for all valid drop targets.
  This makes it easier to add new DropTarget in xml.

Change-Id: I7214d2d30c907ab93c80d92d9f9be6dda2d63354
2016-12-13 23:39:16 -08:00
Sunny Goyal
94b510cc68 Some drag and drop code refactor:
1) Adding DragOptions to easily extend drap functionality
2) Changing onDragStarted signature to send more information
3) Updating states for dropTargetButton based on drag event directly
4) Removing folder item based on onDragStarted and not startDrag

Change-Id: I65b684e092ddc081d086bfe2c8c1973ed170eaeb
2016-09-01 15:55:13 -07:00
Sunny Goyal
47328fd53f Removing the SearchDropTarget bar as it no longer contains the QSB
> Renaming it to simply DropTargetBar
> Moving AppInfo to the top bar as well
> The workspace pages will extend to the top edge (minus some padding).
Since the QSB is no longer displayed on top of every page, there is
no reason to reserve the space.
> In spring-loaded mode, the workspace cell layout will scale enough
to make room for the drop target bar at the top

Change-Id: I2baf607310335dd576c9d9fcbb75ab708f47ac03
2016-06-06 16:15:46 -07:00