How to show only the fitting items in a row? do we...
# compose
n
How to show only the fitting items in a row? do we have any modifiers for this. or should i write a custom layout for this.
👀 1
a
If you want to not place some of the items, you’ll have to use a custom layout.
1
c
But if you are trying to make the items reflow to a second row in the Row, you can use the FlowRow from Accompanist
t
@Chris Sinco [G] if i use
FlowRow
, is there any way can we restrict the number of rows to 1? if yes, would that be a good (easier? 😬 ) approach? [am just lazy to create a custom layout 😬]
c
I don’t think you can restrict the # of rows in FlowRow as it’s built to reflow 🙂
🆗 1
t
Understood, custom layout then 🏃
c
In the above example, are the items you are trying to fit a fixed size?
t
nope. it could be any composable, (text, img, etc)
c
I see. I’m not sure I understand the requirements well enough. If the items aren’t a fixed size, how do you determine what fits and doesn’t? Do you know the min/max size of each one?
t
@Chris Sinco [G] that i need to figure out 😄