diff options
| author | 2023-12-08 13:52:05 +0000 | |
|---|---|---|
| committer | 2023-12-11 11:22:40 +0000 | |
| commit | d23717de505dab5c9051904dff260815c1e6a6e2 (patch) | |
| tree | 86e30bd19b6344d6da857bc041a2b146232cc75d /libs/androidfw/Util.cpp | |
| parent | 9eb42136b1a64aef812940d5b091de9ab39f910f (diff) | |
LargeTopAppBarNestedScrollConnection use PriorityNestedScrollConnection
The LargeTopAppBarNestedScrollConnection used to consume all onPreScroll
events when a scrollable item within it was scrolled up. While this was
correct for the simplest cases, it could cause unexpected behavior
when other components wanted to consume the onPreScroll event.
To resolve this ambiguity, this CL uses a priority concept that allows
the connection to start consuming scroll events only if it has priority
at that moment. The priority for this connection is obtained if the
gesture is starting at that moment and the connection is scrolling up,
or if the connection is scrolling down and there is an offset available.
Test: atest LargeTopAppBarNestedScrollConnectionTest
Bug: 291053278
Flag: NA
Change-Id: I5e642ee21a18d12ea304aa07c4f9a785b65ed200
Diffstat (limited to 'libs/androidfw/Util.cpp')
0 files changed, 0 insertions, 0 deletions