Nat Strangerweather
05/02/2021, 2:46 PMModifier
.onGloballyPositioned {
position.value = it.positionInParent()
}
which is incredibly useful but I would need the value as DpOffset rather than Offset. Is that conversion at all possible?Adam Powell
05/02/2021, 3:06 PMAdam Powell
05/02/2021, 3:08 PMonGloballyPositioned
suggests that this code might be trying to do something across multiple frames that might be better expressed using Layout
Nat Strangerweather
05/02/2021, 3:08 PMNat Strangerweather
05/02/2021, 3:10 PMNat Strangerweather
05/02/2021, 3:11 PMLayout
rather than onGloballyPositioned
?Adam Powell
05/02/2021, 3:15 PMLayout
can measure and position multiple sibling elements together with full knowledge of the connection between them. Adjusting child positioning with a combo of offsets/onGloballyPositioned means the code is iterating positions and trying to converge on a layout solutionNat Strangerweather
05/02/2021, 3:16 PM