Commit Graph

24 Commits

Author SHA1 Message Date
Willie Koomson
61dc97ecb2 Update font settings to match POR
Updates font color, size, weight, and line height for text in the widget
picker to match POR and pass a11y test.

Bug: 317948371
Flag: NONE
Test: Accessibility Scanner contrast test
Change-Id: I3c7676c507b81a616876206681972ebb9fefd0c3
2024-05-02 19:55:33 +00:00
Sunny Goyal
77e732a1c4 Moving widget background to xml, so that the same constantstate is
used for all entries

This helps reduce launcher memory by avoiding multuple duplicate
drawable generation

Bug: 268646258
Test: Verified on device
Change-Id: I829750f081cfce65063b35a614b903066d9a4bed
2023-02-13 05:49:31 +00:00
Sunny Goyal
ed681548fc Moving widget padding to drawable instead of using itemDecorator
ItemDecorator uses item position which is not stable during animations.
Moving it to the background allows the padding to be stable

Bug: 236961658
Test: Verified that the app doesn't crash.
Change-Id: Ied12077de4097e827c5c4157f5196346a301f185
2022-06-23 14:37:17 -07:00
Sunny Goyal
d4cb76ebf0 Preventing widget preview from getting accessibility focus on internal content
Bug: 209579561
Bug: 209579521
Bug: 209579162
Test: Manual
Change-Id: If65a74acf021b19438cdc37b07ac508985f8909a
2022-05-06 11:10:41 -07:00
Steven Ng
24c16de329 Use 32dp as the content margin for widgets pickers in large screen
devices

Test: manual
Bug: 194369046
Change-Id: I7376eab59d57bdd9ccc8a64e9f321358e09ee579
2021-07-27 12:00:52 +01:00
Steven Ng
50f1ff1808 Update all apps & widget pickers personal / work tabs
Test: Open all apps to confirm tab style match the mock in both dark &
      light mode.
      Open widgets picker to confirm tab style match the mock in both
      dark & light mode.
Bug: 191387242
Change-Id: Ie0111f65813128fef5befbdefd451cf0e9f01be9
2021-06-21 22:02:54 +01:00
Stevie Kideckel
ded80076db Add spacing between items as decorations instead of margins
There are bugs in the accounting for the margins if we manipulate the
view directly, causing the wrong top to be reported and the view to be
shifted when we call scrollToPosition. Item decorations ensure that the
layout system for the recycler view always has the right details about
the spacing.

Fix: 191642682
Test: verified locally
Change-Id: Ie80563757079e885c8178883ab16e314d01c5b32
2021-06-21 15:11:33 +00:00
Stevie Kideckel
d93feeba0a Fix corner radius for expanded widget picker list items
Also create the drawables at runtime to avoid all the permutations

Fix: 189329394
Test: verified locally
Change-Id: I0497759ff68bd4ae6b1635423cfd4713f06d349f
2021-06-04 13:04:04 +00:00
TreeHugger Robot
17385ce33e Merge "Fix full widgets picker fast scroller height." into sc-dev 2021-05-25 21:43:40 +00:00
Steven Ng
e90dddaaa0 Fix full widgets picker fast scroller height.
1. Fix the app title to one line.
2. Use the measured height of a header view to estimate the available
   fast scroll bar height.

Test: Open full widgets picker. Scroll to the bottom by scroll gesture.
      Observe the fast scroll bar indicator is correctly shown.
      Scroll back to top and then use the fast scroll bar to scroll to
      the end of the page. Observe the last app row is aligned to the
      bottom of the page.
Bug: 188914448
Change-Id: I57a2419d1fbfc8f946a932eebfefb67ae0c07eb6
2021-05-24 18:05:56 +01:00
Steven Ng
f375e8bebc Fix ripple effect shown when tapping an app row in widgets picker
Test: Open the full widgets and tap an app. Ripple effect is applied
      to the entire row rather than just on the arrow.
Bug: 188873069
Change-Id: Id77b2055f6bc31c12bb19e695ea44aeaff36c4a6
2021-05-24 16:32:56 +01:00
Stevie Kideckel
5fc74c7f8f Add start to widget app name layout gravity
This fixes the alignment issue in RTL. Seems like the default is start
if layout_gravity isn't set, but if you set layout_gravity to
center_vertical, you need to explicitly set start or it will go to the
left.

Bug: 188147009
Test: validated locally and in AS layout preview
Change-Id: Ic4b4d7e6dfe03e1e6dd3ead5c3821e77261b4bb5
2021-05-14 12:37:44 +00:00
Steven Ng
f4bd91f0ab Merge "Add a11y action for expand / collapse items in WidgetsFullSheet" into sc-dev 2021-04-27 16:28:11 +00:00
Steven Ng
fd68f757c8 Add a11y action for expand / collapse items in WidgetsFullSheet
Test: Enable talkback. When focusing on a collapsed item, it announces
      Collapsed "App Name" "n widgets/shortcuts". Action available. Use
      tap with 3 fingers to view. 3 fingers tap > Action > Expand.
      Widgets are expanded.
      When focusing on an expanded item, it announces
      Expanded "App Name" "n widgets/shortcuts". Action available. Use
      tap with 3 fingers to view. 3 fingers tap > Action > Collapse.
      Widgets are collapsed.
Bug: 183120145
Change-Id: Ibbb6025b929c141aa9e2fd2c72dce314e8be837e
2021-04-27 16:28:00 +00:00
Alina Zaidi
b7f5ab04ad Fix few UI bugs in widget picker.
- Update colors for widget picker (b/184236316)
- Adjust padding according to mocks (b/184236316)
- Make sure view holders refresh corners in search mode. (b/185099541)
- Fix search bar shadow being cropped (b/183602001)

Bug: 184236316
Bug: 185099541
Bug: 183602001
Test: Manually tested
Change-Id: Ifa33e090cdf31c95db9c1145e623ef55c42dd52e
2021-04-26 16:48:14 +01:00
Steven Ng
3691179041 Set width & height of app icons in all widgets tray to 48dp
Bug: 184877669
Test: Change the grid size and observe app icons in all widgets
      tray stay the same.
Change-Id: I856d5fada579474fffb6296d641fb686623ca2cc
2021-04-09 11:15:50 +01:00
Alina Zaidi
6d97d893e0 Update Pin widget dialog UI according to mocks.
Test: Tested manually and RequestPinItemTest passed
Bug: 182982143
Bug: 182994819
Bug: 182929673
Change-Id: I905ea0c1860d28ee9fbb456ddf6abd728b65bac4
2021-03-23 13:36:48 +00:00
Steven Ng
8eb1f73d58 A11y fix for all widgets tray (Part 1 / n)
Mark some image view unimportant for accessibility.
Still need to update the content description for widget list
header to describe the expand / collapse action.

Test: Navigate all widgets tray with talkback enabled.

Bug: 183120145
Change-Id: I1801d8351ac7f22a0135a96a36de706377781b31
2021-03-18 23:42:56 +00:00
Steven Ng
08ef694509 Adjust font, color, margin, corners for all widgets tray
Test: manually
Bug: 179797520
Change-Id: Ib78aae05e021da272ef2f754c876d24a4c14bcb0
2021-03-17 22:43:12 +00:00
Alina Zaidi
e17f4651d0 Merge changes from topic "SEARCH_INTEGRATE" into sc-dev
* changes:
  Add a WidgetsSearchBar(Launcher3) and a WidgetsSearchController.
  Have a recycler view to show search results.
2021-03-15 13:24:20 +00:00
Steven Ng
53d1364e8b Better estimate the height of widget recycler view
Test: Expand and collapse apps in the widgets picker. Then, observe
      the height of the fast scroller is correctly displayed.

Bug: 181629430
Change-Id: I9efcf902f8548fc5c8a398609758d43123228e5e
2021-03-12 22:58:45 +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
bcab2a808a Add shortcuts count as a subtitle in the full widgets sheet
Screenshot: https://screenshot.googleplex.com/9Ds55rsFSNajLWN.png

Test: Open full widgets sheet and observe widgets and shortcuts
      counts are correctly displayed.

Bug: 180725078
Change-Id: Ibf43c14cc06c0e9bf245c53f190095d0eaeace12
2021-03-05 09:54:56 +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