Skip to content

Commit 00c62d2

Browse files
Material Design Teamdrchen
Material Design Team
authored andcommittedAug 4, 2022
[AppBarLayout] Fix bug in HeaderScrollingViewBehavior that causes child translation Y not to be reset to default if the behavior is changed from an overlapping to non-overlapping behavior in layoutParams.setBehavior
PiperOrigin-RevId: 462201550 (cherry picked from commit 7fc2aed)
1 parent f6942a4 commit 00c62d2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎lib/java/com/google/android/material/appbar/HeaderScrollingViewBehavior.java

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public boolean onMeasureChild(
8686
if (shouldHeaderOverlapScrollingChild()) {
8787
child.setTranslationY(-headerHeight);
8888
} else {
89+
child.setTranslationY(0);
8990
height -= headerHeight;
9091
}
9192
final int heightMeasureSpec =

0 commit comments

Comments
 (0)
Please sign in to comment.