Commit Graph

7 Commits

Author SHA1 Message Date
Sunny Goyal
5d5085c5c3 Fixing widget not laid-out properly in preview
Bug: 185306338
Test: Manual
Change-Id: Ib1ec8a53e4701f6813813b86bf481b837127a909
2021-06-16 15:24:16 -07:00
Jon Miranda
611dba4c94 Use grid border spacing as widget padding if possible.
Widget padding is added by the system to create reliable consistency
between widgets.

Now that we have added border spacing between cells on the launcher
grid, we have significantly decreased the available space for widgets
on home screens: widget padding is 8dp on all sides, border spacing is
currently spec'd to be 16dp.

We can inset the widget padding added by the system, and instead rely
on the border spacing between cells to create reliable consistency
between widgets.

Bug: 175329686
Test: manual
      turn CellLayout#VISUALIZE_GRID debug flag on
      test drag and drop, resizing using drag handles
      view measurements in go/web-hv
Change-Id: Iabb9f45e82e4ae039f55d7fd27fbd0d23be60191
2021-03-02 15:06:46 -05:00
Adam Cohen
c77bc45fa5 Fix issues with drag and drop from All Apps in non-default grids
=> Also fix the widget tray in these non-default grids, and the external shortcut addition flow. The layout was broken as it was scaling with the icon size. Instead keep it fixed which looks much better, similar to how we maintain all apps.
=> This also fixes a small jump when dragging shortcuts external to Launcher.

issue 154169001

Change-Id: Iad1e3859dd6fedccce9b5c6633e64426a4630c31
2020-05-08 16:00:08 -07:00
Adam Cohen
1d13c0bf13 Cleanup reorder animations to not require layout on every frame
=> Extending on previous CL to separate multiple translation properties
   and avoiding expensive layout pass

Test: manual

Change-Id: I058da7367fb320b9f432bef9482be2966d3a7d42
2020-04-24 01:28:39 +00:00
Adam Cohen
d916206271 Decouple the scaling / translation of widget views necessary in split-screen
=> We pull apart the scale and translation that are set in a fairly
   static way due to split-screen vs. the general translation and scale
   properties that might be used more dynamically, in this case
   for re-order animations
=> This allows removal of some code that breaks reorder animations
   due to the accrual of translations / scales in certain edge cases.
=> TODO in future CL: address other translation cases and make the throw
   case for calling base setTranslationX/Y for Workspace Items unconditional

issue 149438360

test: manual
Change-Id: Ic3fde172f669e215cd25db0fcd4e1c3c873d314f
2020-04-17 15:36:44 -07:00
Adam Cohen
650869973a Refactor / Cleanup / Simplify a bunch of dnd related rendering / animation
Addresses:
=> Fix folder icon drop location mapping (was very far off)
=> Fix BubbleTextView drop animation shifted by a few pixels
=> Get rid multiple unnecessary calls to setDragMode(none), was breaking
   some of the reorder flow; still some issues to address here.
=> Fix folder icon parallax (didn't work when the folder had a dot)

Test: manual

Change-Id: I5959cf341996f75d30212353ec096ed25bf40ea5
2020-03-21 01:26:09 +00:00
Sunny Goyal
c604a10551 Adding keyboard handling to QsbHostView similar to a normal appwidget view
Bug: 116842846
Change-Id: Ibab2dc1793561998f81710301d9ce0ca3d77e7b4
2018-10-15 11:00:28 -07:00