Pablo
12/08/2022, 3:15 PMKirill Grouchnikov
12/08/2022, 3:43 PMPablo
12/08/2022, 4:52 PMZun
12/08/2022, 5:06 PMChris Sinco [G]
12/08/2022, 6:10 PM@Composable
fun Thing() {
Column(Modifier.fillMaxHeight()) {
Spacer(Modifier.fillMaxHeight(0.2f))
Text("Hello")
}
}
Pablo
12/08/2022, 8:58 PMPablo
12/08/2022, 8:58 PMPablichjenkov
12/08/2022, 9:14 PM.onGloballyPositioned
I believe it works with any LayoutNode but you could use it with BoxConstraints too. In the link bellow I played with it a little bit, there is an animation commented out that you can uncomment to see how the offset gets animated.
https://github.com/pablichjenkov/ComposeStudy/blob/04298ca8393d3eea0f5b7883fb22316[…]/app/src/main/java/com/pablichj/study/compose/home/HomePage2.ktPablichjenkov
12/08/2022, 9:17 PMsubComposition
. I mean, if we can call this a problem at this point, it seems that one or 2 more recompositions is not a big performance dealKirill Grouchnikov
12/08/2022, 9:18 PMPablichjenkov
12/08/2022, 9:25 PM