https://kotlinlang.org logo
#compose
Title
# compose
t

Tolriq

09/27/2021, 3:03 PM
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

Csaba Szugyiczki

09/27/2021, 3:04 PM
set a
weight()
modifier with
1f
weight on the first Text so it takes up the remaining space
t

Tolriq

09/27/2021, 3:05 PM
Wow thanks it works, I tried that on the second one as I would in XML world 😢
c

Csaba Szugyiczki

09/27/2021, 3:06 PM
no problem 🙂 I think in xml it works the same way
t

Tolriq

09/27/2021, 3:07 PM
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

Csaba Szugyiczki

09/27/2021, 3:08 PM
Ahh, I see what you mean. Yeah the
fill = false
parameter is quite handy!