Skip to content

Commit

Permalink
[AppBarLayout] Fix bug in HeaderScrollingViewBehavior that causes chi…
Browse files Browse the repository at this point in the history
…ld 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)
  • Loading branch information
Material Design Team authored and drchen committed Aug 4, 2022
1 parent f6942a4 commit 00c62d2
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -86,6 +86,7 @@ public boolean onMeasureChild(
if (shouldHeaderOverlapScrollingChild()) {
child.setTranslationY(-headerHeight);
} else {
child.setTranslationY(0);
height -= headerHeight;
}
final int heightMeasureSpec =
Expand Down

0 comments on commit 00c62d2

Please sign in to comment.