jermainedilao
10/21/2025, 1:14 PMjermainedilao
10/21/2025, 1:16 PMSeri
10/21/2025, 5:08 PMSeri
10/21/2025, 5:09 PMSeri
10/21/2025, 5:10 PMmodifier = Modifier.layout { measurable, constraints ->
// Measure the app bar
val placeable = measurable.measure(constraints)
connection.appBarMaxHeight = placeable.height.toFloat()
// Place it above the screen, according to the scroll offset
layout(placeable.width, placeable.height + appBarOffset) {
placeable.place(0, appBarOffset)
}
}Seri
10/21/2025, 5:11 PMvar appBarMaxHeight is then used inside my NestedScrollConnection to calculate how much scroll offset to consumejermainedilao
10/22/2025, 2:17 PMSeri
10/22/2025, 3:28 PMSeri
10/22/2025, 3:29 PMremember rather than rememberSaveable to store the connection, so the connection object is completely recreated after an orientation change