mirror of
https://github.com/material-components/material-components-android.git
synced 2026-01-20 03:51:33 +08:00
An app bar remembers the visible percentage of its first visible child during recreation to restore its scroll position. However, if an app bar is "fully" scrolled (scrolled to its maximum range), gets recreated, and changes its size after recreation, it can become not fully scrolled even if it keeps the same visible percentage of its first visible child, due to the difference in its own size. This can result in unexpected "gaps" in the layout due to inconsistency between AppBar layout's scroll position and the content view's. Fixes this by remembering the "fully scrolled" state and restore it during recreation. PiperOrigin-RevId: 398013525