Is it possible to change the height of a composable with out causing a recomposition? I do not want to scale the height, I want to be able to feed it a
Dp
height.
r
robercoding
01/12/2023, 4:54 PM
Yep, do it on
Layout
phase
Use the
Modifier.layout{ }
and defer the read inside that lambda, then convert
dp
to
px
and voila, skipping the recomposition when animating the height or any other frequently-changing value for the layout phase!
This is what I did for the