Commit Graph

23 Commits

Author SHA1 Message Date
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
Hyunyoung Song
02e5d63fc7 Fix fast scroller issues / remove fast thumb access / fix wrong popup location
(1) Remove jumping to arbitrary fast scroller position
because back gesture can trigger arbitrary fast scrolling
(2) Pop up would show up in random location when user combines
touching the track and scrolling. This was because thumb
location was not updating when user was scrolling on the main
container.

Bug: 193177670
Bug: 191562400

Test: manual
Change-Id: I129aaa37ca911666453a8c98e24eaac33827238f
2021-07-19 23:44:14 -07:00
Hyunyoung Song
58f49418ff RecyclerView Scrollbar is easier to target
Bug: 191666122
Test: manual

TL;DR;;
1) Allow some x offset when determining touch points are hitting the track
2) reduce the timeout to consider dragging state

Change-Id: Iebcbbbd1e50b602119795c57fc04c4c2a5ccdde5
2021-06-27 22:57:55 -07:00
Hyunyoung Song
a9aeebc5bb Fix NPE inside REcyclerViewFastScroller
Bug: 190939643
Test: manual
Change-Id: Ic01111bb1389b2fa84d86c0ecc20f1eec0940e51
2021-06-14 09:12:30 -07:00
Hyunyoung Song
ebd88cb00b Add sdk check to recyclerviewfastscroller
Bug: 189982238
Test: builds
Change-Id: I2298a67fd957cd2a77c8e5e4c34b828c044f1a61
2021-06-11 15:55:37 -07:00
Hyunyoung Song
7cc29dc44d Fix RecyclerViewFastScroller bugs, hide keyboard
Bug: 189982238
Bug: 187561242
Bug: 187909098

Test: manual
Change-Id: I693810e5761004c48d028253c25a2fe96477af40
2021-06-11 09:43:10 -07:00
Steven Ng
e675a8e6b4 Fix full widgets picker fast scroll offset issue
Even though there is no change in fast scroller offset, the recycler view
scroll Y may still be updated. Let's also notify a scroll change if
the recycler view scroll has changed when updating the fast scroller thumb
offset.

Test: In the full widgets picker, scroll up and down with the fast
      scroller. Then, scroll up and down in the recycler view. The top
      section is scrolled together with the recycler view smoothly.
Bug: 183721076
Change-Id: I009fc7e27c8a20505a60502405ebbf695b5a37f2
2021-05-06 22:58:47 +01: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
John Li
ce7f9f2ae1 Haptic effect on alphabetical scroll in Pixel Launcher
Bug: 169397156
Test: manual
Change-Id: Id0c51ac9e9ca7d0f3aaf9b490874de6ee0e97a28
2020-11-18 08:13:25 +00:00
Sunny Goyal
355e845851 Using inbuild smooth scroller instead of custom fastscrolling logic
Change-Id: I9208720c3bf164bd664e5bacd75b672573fe7601
2020-04-20 11:15:34 -07:00
Tony Wickham
5dc60a0543 Add some egregious back exclusion rects
- Don't allow back gesture at all whenever we hid back button before
- Exclude RecyclerViewFastScroller thumb rect

Bug: 129297464
Change-Id: I40a33697592b02619218c18d1b3def7c3c203f56
2019-04-09 18:28:43 -07:00
Jon Miranda
b0edaeb268 Align rounded corner of fastscroller popup with the top of the thumb.
Bug: 63852509
Change-Id: I90b6d3e87206a53cfb4c8025a8e5f9597cf73898
2018-09-26 13:19:25 -07:00
Sunny Goyal
d230307a95 Migrating to android-x
Change-Id: I9a774152d13a541e8496dd84f2469bfed407f86d
2018-08-14 15:22:12 -07:00
Sunny Goyal
36b54228fc Retiring some feature flags
Change-Id: I80a00ecaec0785ce2ba6a5f14a54c8a76f555d43
2018-07-10 13:52:17 -07:00
Sunny Goyal
2020b20cd9 Disabling alpha layer on some views
Change-Id: Ide1d5951ea80080f8fea8f32a76487b646b4f958
2018-04-17 10:48:54 -07: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
Derek Sollenberger
26a1b452f4 Stop using deprecated Canvas APIs.
Bug: 73777445
Test: compile
Change-Id: Ic0a1f4ebc10ba46229fd97408c052c0b450b4945
2018-03-01 04:39:57 +00:00
Mario Bertschler
ea0eb4bb4b Forwarding touch events from floating header to recyclerview.
Additionally adds little sidepadding to the tabs buttons and fixes yPos
calculations for the scrollbar.

Bug: 69966700
Change-Id: I9d236ce7a782090f5d17931839f24b65b4ce7019
2017-12-07 08:54:36 -08:00
Mario Bertschler
2d3157a0bf Fixes for fast-scrollbar when using work profile tabs in all apps.
- do not hide scrollbar between switching tabs
- full scrollbar height
- show predictionrow only when fully scrolled to top

Bug: 70037972
Bug: 68713881

Change-Id: Icaa434ce2726b75d22ec4ac3287ab2b0e18ce42b
2017-12-05 14:36:16 -08:00
Mario Bertschler
ac9408a5cd Enable work profile tab in all apps.
This CL will bring two tabs to all apps: Personal and Work,
currently only if the user has a workfile set up and
behind a feature flag defaulting to disabled.

Bug: 68713881

Change-Id: Ib5a558281ef3593359db3ad593ee1d0cf279f547
2017-11-14 10:28:54 -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
Sunny Goyal
89d5c5a31b Updating fast scrollbar UI in Landscape
Creating a separate view for FastScrollBar and moving all the relavant logic in
the view.
For protrait, the touch handling is delegated by the recycler view just like before.
For landscape, the dcrollbar does not overlay with recyclerView and handles the touch
itself

Bug: 37015359
Change-Id: Ie1981326457ba739bdf0ac8063db1065f395f133
2017-06-26 14:56:36 -07:00