Commit Graph

5 Commits

Author SHA1 Message Date
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
Sunny Goyal
1d76159de4 Fixing flakyness in widget tests
For some predicted app widgets, the layout happens before the recyclerView
can layout completely (because of preview layout invalidation), causing the
scroll cache to get in a wrong state.
Checking for scroll cache validity everytime instead of only during
data changes

Bug: 255797215
Test: Verified by hardcoing the chrome widget as predicted widget
Change-Id: Id2c68560baa45de89e08c53bdb9ee6820eab68c4
2022-10-28 12:25:04 -07:00
Sunny Goyal
f34811d3a3 Revert "Revert "Updating the scroll calculation from recyclerView to avoid view inflation""
Test: ABTD
https://android-build.googleplex.com/builds/abtd/run/L52600000956969786

This reverts commit cee6ddf3de.

Reason for revert: Fixed in ag/20239136

Change-Id: I0e8446e66d9a86a94b40fcbd6de14da07abe8e5c
2022-10-22 15:37:47 +00:00
Hui Kang
cee6ddf3de Revert "Updating the scroll calculation from recyclerView to avoid view inflation"
This reverts commit 20bbe95ddb.

Reason for revert: Causing flake in Ironwood test: b/248295569

Test: ABTD
Before: Flaky, 14/50 PASSED
https://android-build.googleplex.com/builds/abtd/run/L33900000956890639

Revert: 50/50 PASSED
https://android-build.googleplex.com/builds/abtd/run/L49200000956887317

Change-Id: I41f4428c74e581323f90c716a7852b5e553ae27d
2022-10-17 20:37:49 +00:00
Sunny Goyal
20bbe95ddb Updating the scroll calculation from recyclerView to avoid view inflation
> Updating the LayoutManager's scroll calculation instead of a separate
  implementation to better support recyclerView's calculations
> Caching the view sizes during layout to avoid view-inflation for
  unknown types
> Fixing scrollbar jump during scroll when widget list is expanded
> Fixing scrollbar never reaching end when onboarding card is displayed
  in work tab

Bug: 240343082
Test: Verified on device that new views are not inflated
Change-Id: Ied11ccf65b053691c5c126c4bf8de306ec24786d
2022-09-12 12:24:34 -07:00