Skip to content

Instantly share code, notes, and snippets.

@shoaibmushtaq25
Created December 4, 2024 08:03
Show Gist options
  • Save shoaibmushtaq25/f8e48b1929af80ae15683f20464178b1 to your computer and use it in GitHub Desktop.
Save shoaibmushtaq25/f8e48b1929af80ae15683f20464178b1 to your computer and use it in GitHub Desktop.
...
connection.maxHeight = headerPlaceable.height.toFloat()
connection.minHeight = navBarPlaceable.height.toFloat()
val space = IntSize(
constraints.maxWidth,
headerPlaceable.height + connection.headerOffset.roundToInt()
)
layout(space.width, space.height) {
headerPlaceable.place(0, connection.headerOffset.roundToInt())
navBarPlaceable.place(
Alignment.TopCenter.align(
IntSize(navBarPlaceable.width, navBarPlaceable.height),
space,
layoutDirection
)
)
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment