Commit Graph

230 Commits

Author SHA1 Message Date
Nick Chameyev
5e8dbe77e8 Add unfold animation to launcher icons and widgets
Adds unfold animation to launcher which translates
icons and widgets from the center to the sides on
foldable devices.

Bug: 193794541
Test: manual
Change-Id: I9d6e018a0451d342f02dddea47bc180781c31d43
2021-08-11 16:10:18 +01:00
Hyunyoung Song
a2f87bef6e Merge "Icon sizes/ keyline / font for AA+ results" into sc-dev am: 02b62ed6fe
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14837351

Change-Id: If8f00a4cb12d7942c0d582a45a43372ce89f030a
2021-06-07 15:09:47 +00:00
Hyunyoung Song
e3d32b543d Icon sizes/ keyline / font for AA+ results
Bug: 188946408
Bug: 189166362

Test: manual, screenshots on the bug
Change-Id: I40c77d8ea3cdcc9dcc33afb1026d1f75c21e9f05
2021-06-04 01:43:40 -07:00
Tony Wickham
f262591ab0 Merge changes I6bf48141,I77b7a2e4 into sc-v2-dev
* changes:
  Taskbar drag starts internal pre-drag before system drag
  Let DragView use ActivityContext instead of Launcher
2021-05-26 17:13:49 +00:00
Tony Wickham
8ac277ebd8 Taskbar drag starts internal pre-drag before system drag
- TaskbarDragController now extends DragController.
- Currently there is no pre-drag condition, so we immediately get onDragStart(), which starts the system global drag (which cancels the original internal drag).
- Make the original view invisible during the drag and drop operation, across both internal and system drag events.
- No longer handle onDragEvent() in TaskbarView, as TaskbarDragController handles all of it now.

Test: Drag and drop from taskbar still works (bonus: starts from the correct registration point that you touched down on). Locally added a PreDragCondition and verified a seamless handoff to system drag and drop when the pre drag end condition was met.
Bug: 182981908
Change-Id: I6bf48141a5eedfc6db6f461258e880ef8146e733
2021-05-25 15:35:58 -07:00
Sunny Goyal
c4c3269206 Crossfading splashscreen if icon is themed
Bug: 188840653
Test: Manual
Change-Id: Ibd00bb1a94576a7512872eba39a936c174f9871d
2021-05-25 18:25:18 +00:00
Sunny Goyal
6755587219 Using icon color for dot and halo
Bug: 188839628
Test: Manual
Change-Id: I8a393cc7073d5a249619b4033ec860c55f17167a
2021-05-21 12:57:38 -07:00
Sunny Goyal
d5500548dc Revert^2 "Moving taskbar lifecycle to TouchInteractionService"
430465a3d5
Bug: 187353581
Change-Id: I7b2280d16adfafd3e85ffc1d22e32d0c00d12b67
2021-05-21 07:05:02 +00:00
Kholoud Mohamed
430465a3d5 Revert "Moving taskbar lifecycle to TouchInteractionService"
This reverts commit e215fb730b.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/tests/view?invocationId=I13700009003387451&testResultId=TR89423459137251402, bug https://buganizer.corp.google.com/issues/188755902

Bug: 188755902
Change-Id: I4650136975b60f311499ee6ff5b27ab9a32d23d6
2021-05-20 13:32:05 +01:00
Sunny Goyal
e215fb730b Moving taskbar lifecycle to TouchInteractionService
> Inflating taskbar views with a non-launcher window context
> Removing separate taskbar view in Launcher
> Handling taskbar icon clicks directly instead of going via launcher
> Fixing some relayouts during show/hide animation

Bug: 187353581
Test: Manual
Change-Id: Ia7d44acbb770bf0345922234b3daa5cc040a5843
2021-05-17 21:47:08 -07:00
Sunny Goyal
9ab43772ab Adding support for using themed icons on workspace
Bug: 183641907
Test: Manual

Change-Id: Ieda7e73b3ae4dfe3009e3f23754aff5f8826a967
2021-05-03 20:00:38 -07:00
Sunny Goyal
8b9919de9f Removing some dependency on icon shape
Bug: 183641907
Test: Manual
Change-Id: Ifd492a850bb9918ad378385abe544362e34e70b0
2021-04-07 14:46:16 -07:00
Sunny Goyal
572aca4ce2 Moving some common functionality to IconLoaderLib
Bug: 183641907
Test: Manual
Change-Id: Icfc7ebb140e4e1678b0715beee2e0e513e707b9e
2021-03-25 10:06:53 -07:00
Sunny Goyal
b65d766d88 Adding support for listening for app launch animation completion
Bug: 181165935
Bug: 179065491
Test: Verified on device
Change-Id: Ifa6a91560cb31b4dfb72a0f582607e873d8a002d
2021-03-10 15:53:21 -08:00
Jon Miranda
e126d72fa8 More grid changes, closer to final specs.
* Added isScalable, minCellWidth, minCellHeight, and borderSpacing attrs

When isScalable is true, we use set workspace cell values to
minCellWidth/minCellHeight and then scale the cell values to
fit the available space. This allows us to have consistent
aspect ratios when two devices match the display/grid options.

This is different from the dynamic grid, which calculates
cell values based on iconSize/textSize/etc and then allows
the cell width to be as wide as space allows.

I adjusted some variables so that they will auto adjust
based on another value, indepenent from whether the
grid isScalable or not. An example of this is the folder
label text, where it's always set to be 1.14x of whatever
the workspace icon text size is. This is so we don't need
to add a bunch of more variables to DisplayOption/GridOption.

Bug: 175329686
Test: - switching between device profiles,
      - testing folder open/close
      - testing in multiwindow
      - testing in landscape
Change-Id: Ia469ae0d65b518469ef264b726db46f4a3210056
2021-02-25 17:34:56 -05:00
Hyunyoung Song
db9a53d9aa Add group highlighting to AA+ result
Bug: 180071886
Test: manual
Change-Id: Id1cc3d7400e1a7fe41af272d689aa9315030b420
2021-02-18 02:19:27 -08:00
Tony Wickham
7ba547cd2d Folder support in Taskbar
- Add TaskbarActivityContext which allows shared Launcher elements to
  "just work" using existing generic ActivityContext.
- TaskbarContainerView extends BaseDragLayer<TaskbarActivityContext>.
- Inflate FolderIcon and Folder using TaskbarActivityContext to be
  shown in TaskbarContainerView.
- Use TaskbarActivityContext's DeviceProfile to determine icon size
  instead of overriding in styles. This also ensures that normal
  BubbleTextView icons have the same size as FolderIcons.

Test: Place a folder in home screen hotseat, ensure it shows up in
taskbar and can be opened, and that apps inside it can be launched
or dragged.
Bug: 171917176

Change-Id: Ic25d2f84bcd7e3399c88989305ea565497c030d9
2021-02-16 15:07:01 -08:00
Jonathan Miranda
8dd4ddc7ae Merge "Add border spacing and fixed cell height to grid." into sc-dev 2021-02-16 18:38:38 +00:00
Steven Ng
e92bc55d12 Make all widgets collapsed in the full widget picker by default
Changes:
1. Add a WidgetListHeader view for showing icon, app name and a subtitle.
2. Only WidgetListHeaders are always visible to users in the full widget
   picker.
3. Only one widgets list from an app is visible in the full widget picker
   at any one time.

Test: Auto: run add robolectric tests under widget/picker
      Manual: Open full widgets picker. Then, expand and collapse apps.
      Video: https://drive.google.com/file/d/1gzfeEm5IOAu0qHsO77OTS2eMfU7CHJiL/view?usp=sharing

Bug: 179797520
Change-Id: Idac58be23dfeafcb79b3c61b4972d3addb462de1
2021-02-15 17:46:38 +00:00
Jon Miranda
228877d37c Add border spacing and fixed cell height to grid.
- Border spacing is the spacing between the cells.
- Workspace cell height is now fixed, and we allocate
  all the "extra" space to three different variable height
  areas.

* Built behind ENABLE_FOUR_COLUMNS flag because it hinders the
default grid.

Bug: 175329686
Test: - set border spacing to 0 and confirm matches prior layout
      - test drag and drop still worked
      - test reordering
      - test widgets
      - test folders
      - test multiwindow

Change-Id: Ic6f3dff577d28ff214bda4b0a787ec7fd08c108b
2021-02-10 17:22:37 -05:00
Sunny Goyal
b0bff050f2 Merge "Moving slice loading on a background thread" into sc-dev 2021-02-04 23:29:42 +00:00
Sunny Goyal
79e52fc23b Moving slice loading on a background thread
> Also fixing slice icon loading, such that the request is cancelled
  if views are recycled quickly
> Loading widget label on dg thread and cancelling request if views
  are recycled quickly.

Bug: 179068415
Test: verified locally
Change-Id: Id5a524e2bf596862330a8170394aef9ffd708544
2021-02-04 13:03:33 -08:00
Tony Wickham
aaa42bd0e8 Add recent tasks to Taskbar
- Also adds a divider between Hotseat and Recents
- Dedupes Recents from Hotseat

Test: Open some recent tasks, ensure they are deduped
from Hotseat and also handle < 2 tasks.

Bug: 171917176
Change-Id: Ia782c6ccbcda94cfd844aad04dc3d25a3f072c2b
2021-02-03 18:54:58 -08:00
Hyunyoung Song
5809a40f3e Fix issue of slice icon being rendered on non-UIthread
Bug: 178989579
Test: Manual

Change-Id: I23aa5055c8f07ee9877c1f3ce51cb280ac38a2b7
2021-02-02 01:25:45 -08:00
Tony Wickham
794fe4f58e Add Hotseat items to Taskbar
- Currently supports WorkspaceItemInfo (e.g. normal app icons
  including hotseat predictions and pinned deep shortcuts).
- Currently doesn't support Folders, Notification dots, or
  long press.

Some technical details:
- Always allow HotseatPredictionController updates given the
  Hotseat is always showing even when Launcher is stopped.
- Represent Taskbar Hotseat items as BubbleTextViews, to
  allow for normal click handling etc. When the hotseat is
  updated, we reuse the same BubbleTextViews that were
  initially inflated, and just reapply the new info.
- Add new BubbleTextView iconDisplay for Taskbar, to allow
  for different treatment such as icon size.

Bug: 171917176
Change-Id: I325eb39051f2dc69228b39b5c40ed0cbdad8e200
2021-02-01 18:29:06 -08:00
Schneider Victor-tulias
5f7f4cb35d State download information in content description whether or not there was an update.
Talkback wasn't announcing the incremental download/install progress if the progress wasn't updated. Updated BubbleTextView to update the content description with the incremental download/install info if the progress bar should be shown.

Fixes: 149444435

Test: manual
Change-Id: I3efe6e31cec389da4119a2179a341aedd074a0b7
2021-02-01 19:01:11 +00:00
Schneider Victor-tulias
b40b98db3a Update FloatingIconView to display PreloadIconDrawables during swipe home animations.
Swiping up to go home on an app that is downloading incrementally would cause a jittery animation. Updated FloatingIconView to animate directly to a PreloadIconDrawable.

Demo: https://drive.google.com/file/d/1ddr8OGR4c1ZneyQ0VkkAAxGpwNcP8Wyn/view?usp=sharing

Fixes: 177685929

Test: manual
Change-Id: I4cd2daa18f6d3fed42a9b666063e0b1c1c46e5d9
(cherry picked from commit b8cab8d878)
2021-01-29 01:00:07 +00:00
Samuel Fufa
c282018765 Consolidate Search result UIs
- Allow SearchAction to be represented by SearchResultIcon and SearchResultIconRow
- Fix tap enter to launch regression
- Remove Plugin Pipeline

Bug: 177223401
Test: Manual
Change-Id: Id1d445f6af3f80f840d567165051188c78230ed0
2021-01-25 12:46:05 -06:00
Schneider Victor-tulias
6a5f431a7b Revert "Revert "Add UI updates for incremental app installs.""
This reverts commit 229497d182.

Reason for revert: Patching bugs

Fixes: 176901235, 176992421, 176884453

Test: manual

Change-Id: I57e13a15e72284564a10761966732ee31d15fd08
2021-01-12 12:22:33 -08:00
Schneider Victor-tulias
229497d182 Revert "Add UI updates for incremental app installs."
This reverts commit 84269d349d.

Reason for revert: causes b/176884453 and b/176992421

Change-Id: I3398674a0acbad8329df5d341ae074ac073a6bf9
2021-01-07 19:44:44 +00:00
Schneider Victor-tulias
84269d349d Add UI updates for incremental app installs.
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
2021-01-05 15:17:26 -05:00
Schneider Victor-tulias
7bbec50031 Fix AllAppsSearchPlugin icon redrawing without special-casing.
Preventing icon animations in deep shortcuts fixed the icon redrawing issue in the all apps search page, however other icons could still be redrawn, yet could not be special-cased without removing icon update animations altogether. Added logic to only animate icon updates outside of the all apps search page.

Demo: https://drive.google.com/file/d/1ReT2O_1tV20terY0Jr1NJGxIxPblHCK4/view?usp=sharing

Change-Id: Ibe0b43801ec5340c3551125aef13170d569d2c55
2020-11-12 10:31:20 -05:00
Tony Wickham
22a5a68464 Fix a couple notificaiton dot issues
Fixes: 172010602 by adding drawDotIfNecessary() back to BubbleTextView
Fixes: 167272638 by overriding drawDotIfNecessary() to do nothing in
DeepShortcutTextView

Change-Id: I0bfbbc6e27dedac73ae97c5a084412ce1aba11e4
2020-11-02 17:04:58 -08:00
Schneider Victor-tulias
3ee7018227 Fix All Apps Search plugin shortcut icon redrawing issue.
BubbleTextViews animate the update from their placeholder icons to their high res icons. Added a field to allow restricting what BubbleTextViews' icon updates should be animated. Updated SearchResultIconRow to store the icon Drawable rather than the resource id to prevent unecessary redrawing.

Fixes: 170966269

Demo: https://drive.google.com/file/d/1FBdEl11mHZk1SpCMRY4XZAGt5TVZ01W4/view?usp=sharing

Change-Id: Ib55dafdf5b5fed00d343af5f95f3dd3f08c4ee8e
2020-10-26 14:25:35 -04:00
Samuel Fufa
314761a808 Setup SearchResultIcon for single cell results
SearchResultIcon will be able to render apps, shortcuts and remote actions. It can also handle its own focused state drawing.

Screenshot: https://screenshot.googleplex.com/C3KgjJtLQTBPgaf

Bug: 170752716
Test: Manual
Change-Id: I460a9c128ea3f5814784e342c5d5fa5b7e310882
2020-10-15 14:32:19 -07:00
Samuel Fufa
4b7f38b8fa Align fallback result query with result text
screenshot: https://screenshot.googleplex.com/6Daj5vdmz2jmznX
bug: 169438169
test: Manual
Change-Id: Ie621ed3c834aec5e9467607da4f685d05d152183
2020-10-07 10:31:06 -07:00
Samuel Fufa
02be2a43f5 Support Remote actions
Bug: 168846477
Test: Manual
Change-Id: I7b9dc96bc7a8ccb25ccb4b7135880768256f1ef3
2020-09-24 14:28:49 -07:00
Schneider Victor-tulias
350b462f24 Animate icon update from loading state.
Test: manual

Fixing b/129983531. Having app icons pop in without any animation from a solid placeholder color can look janky. Added a sequential fade in, fade out animation.

Preview: https://drive.google.com/file/d/11NgEja7vzm3f3aH3WbEQljUWGKuuK00_/view?usp=sharing
Change-Id: If77e8f480b02d5b7d29f89afa44450c83a68a276
2020-09-23 14:08:15 -07:00
Samuel Fufa
d6bacdcaf0 Handle AppSearch in plugin
+ Use AppSearchPipeline as a fallback if plugin times out

Bug: 166058597
Test: Manual
Change-Id: I96a38e412fd08f47475d2bc37bff34b86538ea12
2020-08-26 11:37:10 -07:00
Samuel Fufa
4a53c70c57 Introduce support for Hero app Section
[Video attached to bug report]

Bug: 162871508
Test: Manual
Change-Id: Ia6f5621d6220f55e6fd5e56530853c267838442c
2020-08-07 17:29:19 +00:00
Sunny Goyal
30ac97d938 Adding home animation support for non-system Launcher
When user swipes up to home, Launcher will receive a onNewIntent
callwith a bundle-extra gesture_nav_contract_v1. It will contain
the componentName & UserHandle of the closing app & a callback.
Launcher can use the callback to return the final position where
the app should animate to and an optional surface to be used for
crossFade animation. The surface cleanup can be handled in
onEnterAnimationComplete.

Change-Id: I76fdd810fdcb80b71f7d7588ccac8976d9dfe278
2020-07-21 11:43:21 -07:00
Sunny Goyal
44a3b2030d Fixing shortcut popop non-clicable on the icon
Bug: 160819504
Change-Id: I182399aa271a2ad290c33fb39356f8f2c99e105f
2020-07-13 13:15:28 -07:00
Samuel Fufa
167210a323 Keep Predicted icon same size when dragging
-> In addition, this also prevents the drawing of ring effect for predicted icon when view is about to be copied to drag bitmap. Icon will scale to full size (without ring) when dropped.

Video attached to bug report

Bug: 152325754
Test: Manual
Change-Id: Ibd1a5dbf76c41bdc30ae851ad914a4d0e32703c8
2020-05-13 11:22:27 -07: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
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
Sunny Goyal
c4d3201538 Removing support for fake landscape
Bug: 111068105
Change-Id: If31d2f700ddee1d21541735de3a8006ee2a53c5c
2020-04-03 17:11:35 -07:00
Sunny Goyal
17feee8995 Merging stylus click logic in longpress helper for better state-management
Bug: 150825081
Change-Id: I7c507c41e67c09bff5a4ad3abc7a7a62fecf910e
2020-03-27 19:53:20 +00: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