l

    loloof64

    1 year ago
    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
    Column(
                        verticalArrangement = Arrangement.Center
                ) {
                    Text("Hello !")
                    // StaticChessBoard(modifier = Modifier.preferredSize(300.dp))
                }
    k

    Kshitij Patil

    1 year ago
    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)
    l

    loloof64

    1 year ago
    Thank you very much 😃 It worked.