先贴代码
@Composable
fun ShowDivider(modifier: Modifier = Modifier): Unit {
Row(modifier = Modifier.height(IntrinsicSize.Min)) {
Text(text = "left",
Modifier
.weight(1f)
.padding(4.dp)
.fillMaxWidth(),
textAlign = TextAlign.Center
)
Divider(
Modifier
.width(1.dp)
.fillMaxHeight(),
color = Color.Gray
)
Text(text = "right",
Modifier
.weight(1f)
.padding(4.dp)
.wrapContentWidth(Alignment.CenterHorizontally),
textAlign = TextAlign.Center
)
}
}
预览
image.png颈椎疼 有空了再解释
网友评论