mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
When a multiline title changes length (e.g. multi-line to single-line) while collapsed, the layout height decreases. If the previous scroll offset is deeper than the new valid range, the AppBarLayout can jump or get stuck in an invalid state. This fix forces the AppBarLayout to `PENDING_ACTION_COLLAPSED` if the CollapsingToolbarLayout height changes while fully collapsed. This ensures it snaps correctly to the new collapsed offset. PiperOrigin-RevId: 861133526