If I want to get the measurements for a given Composable - say a Text, how would I go about that?
For reference, my use case is that I'm trying to basically animate a column up or down a certain number of items within the column. So my thought is I'd use one of the animation state primitives and change the translation y by some multiple of the height of an item inside the column
z
Zach Klippenstein (he/him) [MOD]
03/08/2021, 6:37 PM
Either
Modifier.onSizeChanged
or
BoxWithConstraints
might work
➕ 1
a
alexsullivan114
03/08/2021, 6:38 PM
I'll take a look at those, thanks!
a
Adam Powell
03/08/2021, 7:29 PM
Generally prefer onSizeChanged for things like this, BoxWithConstraints is generally for making structural changes to the UI in response to available space to consume