https://kotlinlang.org logo
Title
t

Tgo1014

05/12/2022, 12:58 PM
I’ve a
LazyRow
where the items can have different sizes, as it’s the last composable on the bottom of the screen, if when scrolling the user scrolls to a smaller item than the ones displayed first the screen moves up, which makes it seems weird. My question: is there a way to set the
height
of a
LazyRow
to be of its tallest item?
a

Adam Powell

05/12/2022, 1:18 PM
No, because the tallest item in a LazyRow is unknown. If LazyRow were to measure all of its items to find out the tallest height, it wouldn't be lazy anymore
At that point you just have a horizontally scrolling Row
t

Tgo1014

05/12/2022, 1:26 PM
That’s what I imagined, but maybe there was some dark magic param, so didn’t hurt to ask 😄 Thanks Adam!
👍 2