Skip to content

Commit 3e866b8

Browse files
Material Design Teamimhappi
authored andcommitted
[AppBarLayout] Allow scrolling up when the app bar is lifted.
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
1 parent b77b141 commit 3e866b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/java/com/google/android/material/appbar/AppBarLayout.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1533,7 +1533,9 @@ public boolean onStartNestedScroll(
15331533
// or we can scroll the children.
15341534
final boolean started =
15351535
(nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0
1536-
&& (child.isLiftOnScroll() || canScrollChildren(parent, child, directTargetChild));
1536+
&& (child.isLiftOnScroll()
1537+
|| child.isLifted()
1538+
|| canScrollChildren(parent, child, directTargetChild));
15371539

15381540
if (started && offsetAnimator != null) {
15391541
// Cancel any offset animation

0 commit comments

Comments
 (0)