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

Lukas K-G

02/26/2021, 1:00 PM
I would like to align some text in different `Row`s by the longest text before it. I.e.
Auto
Normal
and
Auto
should start at the same offset depending on the longest text in the previous “column” (visualized in green). Any ideas how I achieve do that? 🤔
d

Denis

02/26/2021, 1:01 PM
Maybe put columns in different Columns?
l

Lukas K-G

02/26/2021, 1:04 PM
Hmm, that would probably be an option, it does not really fit my composable structure as all menu items are a separate composable. I was thinking if there might be something like a
SharedSizeGroup
as in WPF?
It may be a bit old
Because what you're asking seems like a table structure
l

Lukas K-G

02/26/2021, 1:16 PM
Yes, but my component structure is not. Each of these rows is intended to be a clickable menu item. 😟
b

BenjO

02/26/2021, 1:18 PM
I'm not sure to understand your requirements perfectly. From what I see in the snippet, you can pass any composable as a row. So you can make them clickable
l

Lukas K-G

02/26/2021, 1:18 PM
Oh, ok. I will have another look. Thanks in the meant ime!
b

BenjO

02/26/2021, 1:19 PM
No problem. You tell me if it works !
2 Views