Hi again : what is a simple way to center a compon...
# compose
l
Hi again : what is a simple way to center a component ? Either horizontally/vertically/in both directions ? I can't manage to handle centering carefully...
I've tried this, but it has no effect
Copy code
Column(
                    verticalArrangement = Arrangement.Center
            ) {
                Text("Hello !")
                // StaticChessBoard(modifier = Modifier.preferredSize(300.dp))
            }
k
You can use respective alignment/arrangement parameters or more general solution would be
Modifier.fillMaxSize().wrapContentSize()
(I'm not sure if this is correct way though)
­čî« 1
l
Thank you very much ­čśâ It worked.