Skip to content

Commit

Permalink
fix missing support for layout direction
Browse files Browse the repository at this point in the history
  • Loading branch information
onebone committed May 1, 2022
1 parent b65a6ab commit 66d04bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/src/main/java/me/onebone/toolbar/CollapsingToolbar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -175,7 +175,7 @@ fun CollapsingToolbarScaffold(
placeable.place(offset)
}
}
toolbarPlaceable.place(0, state.offsetY)
toolbarPlaceable.placeRelative(0, state.offsetY)
}
}
}
Expand Down

0 comments on commit 66d04bb

Please sign in to comment.