Commit Graph

6 Commits

Author SHA1 Message Date
Sunny Goyal
892fab2c14 Using DiffUtil for calculating widget diff instead
of a custom implementation

This uses the same version as all-apps and avoids whole list refresh
when a widget entry is expanded for the first time

Removing tests which were essentially testing the diffing logic

Bug: 268646258
Test: Verified on device
Change-Id: I4799c66b4674e754547317317e7a63f098fce735
2023-02-14 20:59:29 +00:00
Sunny Goyal
62a4932310 Removing unnecessary search header duplication
Bug: 268646258
Test: Verified on device
Change-Id: I33a7df6a523e5600dc6251c3d8feff1236362705
2023-02-10 11:26:05 -08:00
Stevie Kideckel
a093523299 Load widget preview images before adding the rows to the adapter
This allows for smooth animations as the items will have their full
height resolved

Bug: 190892517
Test: verified locally
Test: CachingWidgetPreviewLoaderTest
Change-Id: I86afc6951a4cc82ae45e63795791d259a3bb3cda
2021-06-18 19:18:29 +00:00
Alina Zaidi
d07acba048 Add a WidgetsSearchBar(Launcher3) and a WidgetsSearchController.
- Make WidgetsSearchBar in Launcher3 initialize WidgetsSearchController with SimpleWidgetsSearchPipeline
- Modify SimpleWidgetsSearchPipeline to filter widgets entries on widgets/shortcut labels also.

Test: Tested prototype locally. Also added robolectric test.
Bug: b/157286785
Change-Id: I65f5fa0240ffb6d22023167e4e86d94d83bbd9f7
2021-03-15 11:25:08 +00:00
Alina Zaidi
334e65935b Have a recycler view to show search results.
-Have a recycler view layout for search widgets list.
-Make WidgetsFullSheet implement interface- SearchModeListener to get notified when user is using search and also when search results are ready.
-Have a WidgetsListSearchHeaderViewHolderBinder for search result headers which shows subtext in header as concatenated string of widget/shortcut labels.
-Modify WidgetsListAdapter and WidgetsDiffReporter to work well with search recycler view.

Test: Tested prototype locally. Also added robolectric test.
Bug: b/157286785
Change-Id: Ie29d9f295fddb6d727b5fc26a360f514f2f4a763
2021-03-11 21:27:51 +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