Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ fun CollapsingToolbarScaffold(
minWidth = 0,
minHeight = 0
)
// Measuring the toolbar updates toolbarState, which bodyConstraints depends on. Therefore
// the toolbar MUST be measured BEFORE bodyConstraints is computed.
val toolbarPlaceable = measurables[0].measure(toolbarConstraints)

val bodyConstraints = constraints.copy(
minWidth = 0,
minHeight = 0,
Expand All @@ -139,9 +143,6 @@ fun CollapsingToolbarScaffold(
constraints.maxHeight
}
)

val toolbarPlaceable = measurables[0].measure(toolbarConstraints)

val bodyMeasurables = measurables.subList(1, measurables.size)
val childrenAlignments = bodyMeasurables.map {
(it.parentData as? ScaffoldParentData)?.alignment
Expand Down