Skip to content

Commit

Permalink
[AppBarLayout] Allow scrolling up when the app bar is lifted.
Browse files Browse the repository at this point in the history
1. Suppose the view is large enough to scroll down
2. After scrolling down, you hide a child view, which reduces the height to a value which means it would have been unscrollable in step 1
3. Now you can’t scroll back up

PiperOrigin-RevId: 623883120
  • Loading branch information
Material Design Team authored and imhappi committed Apr 11, 2024
1 parent b77b141 commit 3e866b8
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -1533,7 +1533,9 @@ public boolean onStartNestedScroll(
// or we can scroll the children.
final boolean started =
(nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0
&& (child.isLiftOnScroll() || canScrollChildren(parent, child, directTargetChild));
&& (child.isLiftOnScroll()
|| child.isLifted()
|| canScrollChildren(parent, child, directTargetChild));

if (started && offsetAnimator != null) {
// Cancel any offset animation
Expand Down

0 comments on commit 3e866b8

Please sign in to comment.