我正在尝试创建一个没有文本,只有图标在中心的圆形 OutlinedButton
。
OutlinedButton(onClick = { /*TODO*/ },
shape = CircleShape,
border= BorderStroke(1.dp, Color.Blue)
) {
Icon(Icons.Default.Add, contentDescription = "content description")
}
最后的按钮呈椭圆形: 使用
IconButton
: IconButton(onClick = { },
modifier = Modifier
.clip(CircleShape)
.border(1.dp, Color.Red)
) {
Icon(Icons.Default.Add, contentDescription = "content description",tint = Color.Red)
}
这是最终结果: