robercoding
12/16/2022, 2:32 PMImage(...)
outside of composition phase? 🤔robercoding
12/16/2022, 2:34 PMImage
and I kinda dislike that it recomposes a hundred of times, do you know if that's skippable or?robercoding
12/16/2022, 2:34 PMdrawBehind { }
and drawWithContent
, but sadly this didn't work.
I'm guessing there must be another way
Edit: I don't want to go through recomposition just because I'm animating somethingrobercoding
12/16/2022, 3:37 PMsize
determined on Composition
phase?
I'm thinking that there should be a way to do this in Layout
phase right? Since it determines the size & placement of the layoutZach Klippenstein (he/him) [MOD]
12/16/2022, 11:40 PMrobercoding
12/17/2022, 10:03 AM.layout { measurable, constraints ->
val size = sizeAnimation.toPx()
val placeable = measurable.measure(Constraints.fixed(size.toInt(), size.toInt()))
layout(placeable.width,placeable.height) {
placeable.placeRelative(0, 0)
}
}
Thank you Zach! 🫶