diff --git a/lib/src/main/java/me/onebone/toolbar/CollapsingToolbar.kt b/lib/src/main/java/me/onebone/toolbar/CollapsingToolbar.kt index 295bc28..8893d47 100644 --- a/lib/src/main/java/me/onebone/toolbar/CollapsingToolbar.kt +++ b/lib/src/main/java/me/onebone/toolbar/CollapsingToolbar.kt @@ -280,11 +280,11 @@ private class CollapsingToolbarMeasurePolicy( placeable.place(offset.x, offset.y) } is CollapsingToolbarParallaxData -> - placeable.place( + placeable.placeRelative( x = 0, y = -((maxHeight - minHeight) * (1 - progress) * strategy.ratio).roundToInt() ) - else -> placeable.place(0, 0) + else -> placeable.placeRelative(0, 0) } } } diff --git a/lib/src/main/java/me/onebone/toolbar/CollapsingToolbarScaffold.kt b/lib/src/main/java/me/onebone/toolbar/CollapsingToolbarScaffold.kt index b6be56a..eae15f1 100644 --- a/lib/src/main/java/me/onebone/toolbar/CollapsingToolbarScaffold.kt +++ b/lib/src/main/java/me/onebone/toolbar/CollapsingToolbarScaffold.kt @@ -165,7 +165,7 @@ fun CollapsingToolbarScaffold( val alignment = childrenAlignments[index] if (alignment == null) { - placeable.place(0, toolbarHeight + state.offsetY) + placeable.placeRelative(0, toolbarHeight + state.offsetY) } else { val offset = alignment.align( size = IntSize(placeable.width, placeable.height), @@ -175,7 +175,7 @@ fun CollapsingToolbarScaffold( placeable.place(offset) } } - toolbarPlaceable.place(0, state.offsetY) + toolbarPlaceable.placeRelative(0, state.offsetY) } } }