Hello, I just have a little question. I'd lke to d...
# compose-desktop
d
Hello, I just have a little question. I'd lke to display a column with a button above a text and a switch. But you can see on the image that result is ugly... How can I make the components stacking each other without overlap ? And how can I display the full text ? I join the code for that part in a thread. Height of the background row is 100 dp.
Copy code
Column(modifier = Modifier.fillMaxHeight(),
                    horizontalAlignment = Alignment.CenterHorizontally,){
                Button(modifier = Modifier.height(50.dp).padding(bottom = 5.dp),
                    enabled = true,
                    onClick = {
                        deckGUI.saveDeckLocally()
                        onSelect(deckGUI.deck.value)
                    }) {
                    Text(
                        text = "Select and play !",
                        color = Color.White,
                        style = buttonFont
                    )
                }
                Row(verticalAlignment = Alignment.CenterVertically,
                    horizontalArrangement = Arrangement.Center){
                    Text(text = "Play against IA ?",
                        style = miniFont)
                    Switch(checked = false,
                            onCheckedChange = {})
                }
            }
d
Not sure if I get it right and if it's what you want, but you could: • Add a
Spacer
between the Button and the Row or add some padding to the Row to separate them more • Full Text: Add padding or Spacer in the row between the Text and the Switch Composable.