How can I start the text field to middle of screen...
# compose
c
How can I start the text field to middle of screen ? This is not starting Text from the center
Copy code
Column(
    modifier = Modifier.padding(start = 10.dp)
) {

    Spacer(modifier = Modifier.fillMaxHeight(0.5F).fillMaxWidth())
    Text(
        text = "Provider name",
        style = TextStyle(
            color = Color.White,
            fontSize = 14.sp,
            fontWeight = FontWeight.Bold,
            textAlign = TextAlign.Center
        )
    )

    Text(
        text = "Provider Address",
        style = TextStyle(
            color = Color.White,
            fontSize = 11.sp,
            textAlign = TextAlign.Center
        )
    )

    // setRatingBar()
}
I want to start “Provider name” from vertical center
v
Copy code
Column(
    modifier = Modifier.fillMaxSize(),
    verticalArrangement = Arrangement.Center,
    horizontalAlignment = Alignment.CenterHorizontally
){ // do some stuff}
try this
c
v
Yes brother
It will
if you give my code a try
c
matchParentSize was missing, it now worked for me . Thanks
Copy code
Column(
    modifier = Modifier.matchParentSize().padding(start = 10.dp),
    verticalArrangement = Arrangement.Center,

) {