Commit Graph

22 Commits

Author SHA1 Message Date
Shamali P
ab0ddca48d Update fonts for widget picker
Screenshot test will be updated when build flag is moved to staging

Bug: 393610557
Flag: com.android.launcher3.gsf_res
Test: on device
Change-Id: Ide96093555b7f4592952a2c111cc14062c8d41e7
2025-03-25 00:20:38 +00:00
Shamali P
1ce33c8537 Make overscroll in recommendation section limit within its bounds.
Previously, it stretched the parent container, which on close
 observation looked odd.

Bug: 360061549
Flag: EXEMPT BUGFIX
Test: Opened picker and tested that stretch doesn't overflow.
Change-Id: I531b91131f7f86f37df21ab0f67a778c4ae7843f
2024-11-15 23:34:34 +00:00
Shamali P
8c965c67dc Adjust tap target of the profile tabs in picker
Uses insets on background drawable to maintain visual size.

Bug: 360245807
Test: Accessibility scanner
Flag: EXEMPT bugfix
Change-Id: I1fbc7c2c782a1e331dd1ba77b0a3bf8aad277792
2024-08-20 00:42:32 +00:00
Shamali P
02a75fc924 Distribute the padding between search&rec container and tabs/applist
When there are no recommendations (pre-V as well), the margins/paddings
between search container & apps list / tabs was 8dp extra.

Additionally, cleaning up -
1. requestLayout call on page switch is now not needed after limiting
the table space for recommendations in two pane picker.
2. After preview container sizes, TOP alignment actually looks a bit
better - and widget preview itself is automatically center aligned as
we club only same preview container sizes in a row now.

* http://screen/6e6YzjqXJrdZ7Bt
* http://screen/AVLpzoYSGpyr2rs
* http://screen/7xnmrtLvBMPX5iX
* http://screencast/cast/NjYyNzM4NDY3MjM4NzA3Mnw2NDY0MmU4ZC0xMw (phone)
* http://screencast/cast/NTYwMzE1NDI1ODI5NjgzMnw2NmM1MjRkZS0zNA (fold)
* http://screencast/cast/NTIzODk3NTM5MTMzNDQwMHxlYmE2NDEwNS0xZg (tablet)

Bug: 319152349
Flag: N/A
Test: Screenshot and manual
Change-Id: I164419624d02fb47e80ea844eea0ee2a869ad4df
2024-03-15 13:36:20 +00:00
Shamali P
b3a4d65bb7 Initial UI changes for displaying categorized suggestions.
Ordering changes and some more UI changes in follow-up.

Bug: 318410881
Test: See screenshots
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Change-Id: I77e7f4dcdda32e2921ae56721cddbe261832f0d8
2024-02-16 18:43:20 +00:00
fbaron
c54a8c3c65 Fix switching between work and personal profile in widget picker not clipping recyclerview
Fix: 283139508
Test: Verify swiping between work and personal profile clips the recyclerview properly
Flag: no flag
Change-Id: I7f4ccd6981f91a5ccb9705eca67823c8c81c262f
2023-05-22 10:49:18 -07:00
fbaron
328ca3811c Update colors for widget picker
Bug: 278157622
Test: Look at widget picker on tablet and verify that the colors match the new spec, and verify the portrait mode looks good also.
Change-Id: I634d876dfafc086806b233c500f7d8daddfe7b0b
2023-04-18 16:17:24 -07:00
Federico Baron
79572f6a21 Fix margins/padding in widget picker
Widget picker had weird issues because when we adjusted margin/padding on orientation change we were changing margin/padding of things that didn't have that amount set initially. The function onContentHorizontalMarginChanged was changing the margin/padding of recyclerviews and the stickyheaderlayout. This corrects the issue and there should be no margin/padding errors when we rotate, as the recyclerviews and stickyheaderlayout have the right margin set from the beginning.

Fix: 269348654
Test: Go to widget picker on tablet, rotate to landscape/portrait, rotate back to landscape/portrait. Verify that marins on the sides of widget picker are correct.
Change-Id: If5a26ae23b440c8a4a55cd0029042b2a5d5398b3
2023-02-16 20:57:37 +00:00
Fengjiang Li
cb640da2bb [Predictive Back] Widget to home polish: show extra rows at bottom during animation
1. setClipChildren(false) for WidgetFullSheet and content view during animation
2. setClipToOutline(true) for WidgetsRecyclerView and provide ViewOutlineProvider to expand bottom by 5% of height
3. Override calculateExtraLayoutSpace() for ScrollableLayoutManager
4. Manually modify AbstractSlideInView#mContent's background drawable during scale animation

bug: b/260956481
Test: manual

Change-Id: Ic391639de887cf4a70bc4965dc0b1fd9bc12dd2c
2023-02-15 15:33:29 -08:00
Sihua Ma
13376cf2aa Rename the widget suggestion background drawable for outside usage
Bug: 237343464
Test: N/A
Change-Id: If380684dd28312af4897de301e592224b64f920d
2023-02-02 13:41:44 -08:00
Sihua Ma
60813a89f7 Changed widget picker personal-work tab layout
Used layout margin instead of padding. Also making sure that Talkback would focus on the widgets title once the widget picker is opened.

Before: https://screenshot.googleplex.com/AgZspqTc7yS2Lte
Now: https://screenshot.googleplex.com/5W66ky7XAByCFRZ

Fix: 247121867
Test: Manual
Change-Id: I76534454754c5e57ab51ae7ce06ca4370a3fd22b
2022-12-09 13:58:57 -08:00
Sunny Goyal
9b458a0012 Generalizing the PredicitonScroll view so that in can be used in all-apps
Bug: 234008165
Test: Verified no-functionality-change on device
Change-Id: Ie17d58148b9bdcb08847beb24114b0494437b30e
2022-07-06 12:29:01 -07:00
Sunny Goyal
4827a7d5a9 Fixing widget accessibility node order
Making sure that that search and prediction bar are on top of
RecyclerView/PagedView. This is determined by the widget of the
drawn width of the views if their top matches

Bug: 209579563
Test: Verified that the tite is focused first when opening widgets
Change-Id: Ib800b3743ece915ac4894029462d5776d389ff3f
2022-06-29 11:32:36 -07:00
Steven Ng
0e8a2ce0a9 Fix RecyclerViewFastScroller scrolling in widgets full sheet
See b/200132426 regarding to the bugs.

Test: manually tested full widgets picker scrolling on phone and 2
      panels UI.
Fix: 200132426
Change-Id: I13c7a7262e9357cf0acac1c2c7c069b2118bd527
2021-09-22 18:02:44 +01:00
Sunny Goyal
77acf12905 Fixing header jump
Linking header position to an empty entry in the recyclerView,
instead of calculating the vertical scroll position. This
allows the header to be in sync with the recyclerView scroll and
item animations

Other simplifications:
> Moving top collapse handle out of header view (it doesn't scroll)
> Removing background clipping logic from full-sheet
> Moving tab bar inside the header view

Bug: 196464142
Test: Verified on device
Change-Id: Iae5a0ae9af7ce258e1b391b8e85c5c270fe56197
2021-08-16 09:45:14 -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
ede641bd77 Adjust padding, margin of tabs in the WidgetsFullSheet
Also remove elevation set to tab to remove unwanted shadow.

Test: Set up a work profile. Then, open the full widgets picker.
      Observe padding & margin of the work / personal tabs.
Bug: 188221455
Change-Id: I761cb1c1410f87c80a5fdca3803fb8b099d499d6
2021-05-24 11:40:16 +01:00
Alina Zaidi
071665c89b Prevent cropping of personal/work tabs in full screen widget picker.
Bug: 187632869
Test: Tested manually
Change-Id: I39a43ed1efae5802ffdd5d79ad3cb1a50af38d62
2021-05-12 14:57:42 +01:00
Steven Ng
fd604ee7ae Use a separate personal/work tabs layout for the widget picker
1. Apps are feminine while widgets are masculine in some languages.
   We should use a different set of strings to ensure strings are
   translated with the right context.
2. We will be using a different theme for widget tabs. Let's keep
   the layout separate.

Bug: 184613311
Test: manual
Change-Id: I88df8ca6091e4b6ddf81f34f180a6ce2cada16e3
2021-04-08 11:14:24 +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
167f81b931 Add a header container view to the widgets full sheet
A header container view will contain
1. A horizontal bar: for indicating the popup view can be dragged
   to dismiss:
2. A title view: a title of the widgets full sheet popup view.
3. A search bar: for widgets / shortcut search. Since we will be
   making the fallback search algorithm available in AOSP, the
   search bar will now live in the Launcher3 codebase.
4. Recommended widgets (coming soon...)

This CL also added a scroll effect which gradually collapses the
title view when the user scrolls down the recycler view. The title
view will gradually restore its height when the user scroll to the
top of the recycler view.

Test: Manually test widgets pickers in work profile and non work
      profile setup. Verified the fast scroll bar works well in
      both setup.
      With searchbar: https://drive.google.com/file/d/19grUHL_LspLhMD_5p6-i0CiMW1FpflmD/view?usp=sharing
      Without searchbar: https://drive.google.com/file/d/1KRPgEAESHUhJDo1UJsQN80JO1c9Y8Nhl/view?usp=sharing

Bug: 179797520

Change-Id: If0016e3b3c693414897140e7912531ed9bd5deef
2021-02-26 10:03:36 +00:00
Steven Ng
391404fcb7 Add personal / work tabs for work profile widgets
Video: https://drive.google.com/file/d/1TORRNcvVM7fIvNd_WZaajLbI7D9z4VFA/view?usp=sharing


Test: Main profile only: run AddConfigWidgetTest.
      With work profile: manually launch the full widgets sheet.
      Go to the personal tab: only personal widgets are shown.
      Go to the work tab: only work widgets are shown
      Successfully add personal / work widgets from the full widgets
      sheet.

Bug: 179797520

Change-Id: Iad8b90c2af35e0580319d7a05510ec88e4f8b86c
2021-02-22 16:10:09 +00:00