Does anyone know whether it's possible to make a S...
# compose
t
Does anyone know whether it's possible to make a ScrollableTabRow only take the amount of width it actually needs? I'd like to horizontally center a ScrollableTabRow but it seems to take up more width than it actually needs to show the amount of tabs I'm providing it, meaning it looks offset from the center
p
if you set
weight(1f)
to your children, is that ok?
t
ScrollableTabRow doesn't seem to expose a RowScope for the content so I don't think I can actually do this
­čÖł 1
p
what about using
TabRow
?
t
All items in a TabRow have an equal proportion of the width while I actually need each item to take as much as they need (and have the overflow be scrollable)
I've noticed that I can copy the ScrollableTabRow code and only remove the
fillMaxWidth
on the
SubcomposeLayout
to make it work like I expected (not take up more width than it needs). Is this something I can file an issue for or is this expected behavior?
Worst case we'll have to copy the code and manually try to keep it in sync with the material3's version, but I'd rather avoid this if possible.