Hello folks, I was wondering if Jetpack compose ha...
# compose
a
Hello folks, I was wondering if Jetpack compose has a GeometryReader alternative, or any other way of measuring a node's absolute position
z
Modifier.onPositioned
gives you a
LayoutCoordinates
object which can give you global coordinates
a
@Zach Klippenstein (he/him) [MOD] But there isn't an imperative API similar to the dom, right?
z
nope
not that i’m aware of, there aren’t really any imperative apis in compose. You can make a
MutableState
and put the coordinates from the
onPositioned
callbacks in your state
👍 1
a
Yeah, sure! Thanks!