Draw a line in jetpack compose

You can use

Divider Composable

method for Horizontal line like below.

Divider(color = Color.Blue, thickness = 1.dp)

Example :

@Composable
fun drawLine(){
    MaterialTheme {

        VerticalScroller{
            Column(modifier = Spacing(16.dp), mainAxisSize = LayoutSize.Expand) {

                (0..3).forEachIndexed { index, i ->
                    Text(
                        text = "Draw Line !",
                        style = TextStyle(color = Color.DarkGray, fontSize = 22.sp)
                    )

                    Divider(color = Color.Blue, thickness = 2.dp)

                }
            }
        }

    }

}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)