You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the ExitUntilCollapsed scrolling strategy, the height of the CollapsingToolbarScaffold's body is calculated incorrectly when it is restored from saved state after being killed in the background.
Replication steps
Update the sample app to use the ExitUntilCollapsed scrolling strategy
Open the sample app
Scroll all the way down to the bottom of the list
Background the app
Kill the app while in the background via ADB: adb shell am kill me.onebone.toolbar
Reopen the app to trigger state restoration
Expected behaviour: the list is scrolled all the way to the bottom
Actual behaviour: the last few elements of the list are obfuscated and it is not possible to scroll further down to reveal them
Additional notes
The issue "fixes itself" if you scroll all the way up and then down again.
Root cause
Measuring the CollapsingToolbarScaffold's toolbar updates the CollapsingToolbarState, which CollapsingToolbarScaffold's body measurement constraints depend on. Therefore the toolbar must be measured before the body measurement constraints are calculated.