Commit Graph

29 Commits

Author SHA1 Message Date
MrSluffy
eeb7416bfe Merge branch 'android15-release' into merge-aosp15 2024-09-14 17:29:57 +08:00
fbaron
88676ba7bb Fix two pane widget picker bugs
Here we:
-Move no widgets text outside of the right pane so that we can center it
-setInset and change the clipping of children in the views so that we can fix the padding at the bottom when we have 3 button nav
-create selectedHeader where we keep track of the currently selected header in order to refresh the widgets for the selected header on rotation
-when widgets are bound we check if there are no recommended widgets, and if there aren't we select the first visible header

Fix: 324002996
Fix: 324001940
Fix: 323417968
Fix: 323460545
Fix: 323409306
Test: WidgetPickerImageTest
Flag: NONE
Change-Id: Ibd85cb086bb6c2aede6cf79da0c688a1fdaec4e5
2024-02-07 22:36:59 +00:00
MrSluffy
32700b0100 Merge branch 'android14-release' into 14-dev 2023-12-13 18:47:55 +08:00
MrSluffy
19bf26dd5a Merge branch 'aosp-13' into 13-wip 2023-10-21 09:52:01 +08: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
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
Suphon Thanakornpakapong
4d56a09a07 Use stretch effect in widgets menu 2022-05-11 11:10:37 +07:00
Suphon Thanakornpakapong
b2305001c4 Fix widgets crash 2022-05-11 11:05:29 +07:00
Zak Cohen
1dc4dea6ae Bring Widget Picker message style inline with All Apps message style.
Bug: 188227318
Test: Local flash with TestDPC to test message.
Change-Id: I63403f1472a582a63299e647604eaea25b50b8e7
2022-04-21 10:53:17 -07:00
Sihua Ma
59cfcd0946 Updating font to Google Sans for widget dialog when work profile is paused
Changing the font family of no_widgets_text to Google Sans.

Test: Manual
Fix: 226612140
Change-Id: I70d98c9571aa3a62bb61685b10ae46530630bf97
2022-03-30 00:23:44 +00:00
Alex Chau
b8c22e1155 Tune AllApps bottom sheet VisD and motion
- Make AllApps bottom sheet solid and appears from bottom
- Teleport AllApps bottom sheet as user drag to reduce drag range
  - Consider teleport interpolation for state transition sdetection
- Tuned workspace motions for AllApps bottom sheet (no translate, shrink)
- Add portrait vertical translate for tablet portrait including taskbar AllApps
- Updated bottom sheet handle and created common variables for other bottom sheets

Bug: 208599118
Test: manual on tablet AllApps, taskbar Allapps and handheld AllApps
Change-Id: I69dba5f155914cd012cc8ef3be1ef71fb2be5a40
2022-02-23 17:08:06 +00:00
Alina Zaidi
de262a919a Make widget pickers edit text box parent focusable.
This is so that when focus is cleared from edit text box, the focus
fallbacks to parent view when external keyboard is used.

Bug: b/197129170
Test: Manually checked that behavior is okay when widget picker and
search is used with and without keyboard. Manually checked talkback
navigation is ok.

Change-Id: Iec2e1ff183dae20803ba2f6eb6e260d2a57779b8
2021-09-24 15:01:20 +01: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
Alina Zaidi
267e9b0c04 Rename strings for no search results and no widgets in widget picker.
Also update text size and font.

Bug: 191732424
Test: Not needed, minor string change
Change-Id: I90f00f1316524c48520c4cfc265ab2d5e78e3281
2021-06-22 16:14:59 +01:00
Steven Ng
6ed382efee Remove elevation from the full widgets picker container
Test: Open the full widgets picker and observe no shadow added to the
      rounded corners.
Bug: 189808029
Change-Id: I539f6ebc0310cd4a037cd5eab6db4ee22b579195
2021-06-01 23:21:03 +01: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
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
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
d73d6e56a9 Show an empty view when there is no widget available
Test: Remove all widgets from work profile using TestDpc. Observe
      empty view is shown in the full widget tray. Add back some
      widgets to work profile and observe widgets showing up in the
      full widgets tray

Bug: 179797520
Change-Id: I2e1fcb5a0014568a4674e2bcc0a3ed3c6ec5a44a
2021-03-10 17:36:37 +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
Steven Ng
2f5648a911 Refactoring before adding a new view type in the WidgetsListAdapter
Changes made:
1. Model: added an abstract class for storing common information for
   entries shown in the full page widgets picker.
2. Introduced a ViewHolderBinder interface to split the logic of binding
   data to ViewHolder into separate classes.
3. Move the view holder binding of WidgetsListRow from WidgetListAdapter
   to its new class.
4. Move some widgets picker classes into a new picker package.

Test: Auto: Run WidgetsListAdapterTest, WidgetsListRowEntryTest and
      WidgetsListRowViewHolderBinderTest.
      Manual: open the all apps widgets tray and navigate the list.

Bug: 179797520
Change-Id: Iab29557842bb79156cad84d00a4c5d0db0c5aa06
2021-02-10 21:23:40 +00:00
Sunny Goyal
016d7e93c1 Using spring layout for widget sheet
Bug: 72811152
Change-Id: Ifd4ade7327589871532288eb2982cf5b4f084979
2018-03-09 11:10:43 -08:00
Sunny Goyal
3661bfac0b Fixing fast scroller touch handling in all-apps and widget sheet
Also removing scrim view, instead drawing the scrim manually

Bug: 73085356
Change-Id: I188c6c9b1685e22d5d97b38dd5d3e960b655c9ba
2018-03-06 11:41:43 -08:00
Sunny Goyal
6639a5dfe0 Updating the scrim and landscpae ui
> Instead of views, using a custom class to draw the color scrims
> All-apps has full screen UI
> Quickstep does not have search box in landscape

Bug: 73085356
Change-Id: I360a78a2ade0134daad29fe712796cd39a381fbb
2018-03-01 11:23:46 -08:00
Jon Miranda
84e2436220 Update widget full sheet / bottom sheet to have top rounded corners.
Bug: 71775241

Change-Id: I11b5adc555f48f44cf8167e8699cae1dfe164736
2018-02-13 16:18:19 -08:00
Sunny Goyal
f1fbc3fbe7 Converting widget panel into a floating view
> The widget panel is only inflated when needed
> Using the swipe up/down interaction for widgets tray
> Removing additional view wrappers from all-apps
> Widget tray is preserved across activity recreation
> Launcher no longer has WIDGET state, the actual code around
  the states will be removed in a follow-up cl

Bug: 67678570
Bug: 67585158
Change-Id: Ia29a7c33ec81e6c53cc24e2906b7022b6f41755b
2017-10-13 18:47:54 -07:00