So, when using LazyRow and/or HorizontalPager is t...
# compose
m
So, when using LazyRow and/or HorizontalPager is there any good way to get the composable to size itself to the maximum size of all it’s children? I know the laziness presents issues in this case because not all of the children will be added to the composition, so this might not even be doable. But we’re basically looking for this behavior for things with a very small # of cards (say 5 or 6), so laziness is not much of an issue. Yes, i can roll out my own Row with a scope that collects composables, then measures and renders them, inserts fling behavior, etc…. But that seems overkill
c
You might be able to leverage
LazyLayout
for this. It's what
LazyRow
and
LazyColumn
use under the hood
a
for HorizontalPager there is a param beyondBoundsPageCount which can do that for you