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
Loading
Please register or sign in to comment