What would be the correct modifier to have a Row c...
# compose
t
What would be the correct modifier to have a Row containing 2 Text that are adjacent but with the second one always visible, so that max width of the first one would be total width - second text width?
c
set a
weight()
modifier with
1f
weight on the first Text so it takes up the remaining space
t
Wow thanks it works, I tried that on the second one as I would in XML world 😢
c
no problem 🙂 I think in xml it works the same way
t
Not really in XML there's no notion of fill = false, so weight 1 on the first would have it take all space and not wrap.
👍 1
Anyway thanks a lot for showing the way.
c
Ahh, I see what you mean. Yeah the
fill = false
parameter is quite handy!