dimsuz
05/28/2021, 12:20 PMColumn {
Button(modifier = Modifier.fillMaxWidth()) {
Icon()
Spacer(weight = 1f)
Text()
Spacer(weight = 1f)
}
}
This works great, but now I also have cases where I want to remove fillMaxWidth()
and I want both spacers to be equal to 0
width when laid out.
I.e. without fillMaxWidth
I want this button to behave like "wrap_content" in old times: icon + text, centered in column, no space between them. Currently they still stretch, so removing fillMaxWidth
has no effect and button stretches to full column width. Can this be done?Albert Chang
05/29/2021, 10:32 AMArrangement
. You can see Arrangement.SpaceEvenly
and Arrangement.SpaceBetween
for examples.dimsuz
05/31/2021, 9:45 AM