我上面有脚手架和浮动操作按钮。 floatActionButton 的布局为 Row,带有 fillMaxWidth 和按钮。
在floatingActionButton下我有一些按钮,我可以单击空的floatingActionButton行位置,我可以单击floatingActionButton并单击位于主视图上floatingActionButton下的按钮。
如何让行布局不可点击?
Scaffold(modifier = Modifier.fillMaxWidth(),
floatingActionButton = {
Box(modifier = Modifier.padding(start = 32.dp)) {
Row(
modifier = Modifier
.border(
width = 1.dp,
color = Color(0xFFC1C1C1),
shape = RoundedCornerShape(size = 12.dp)
)
.fillMaxWidth()
.height(80.dp)
.background(
color = Color(LocalAppCustomResources.current.attachmentBackGround),
shape = RoundedCornerShape(size = 12.dp)
)
.padding(16.dp)
}
}
)
您可以尝试使用
Surface
代替 Box
,如下所示:
Surface(
modifier = Modifier
.wrapContentSize().padding(start = 32.dp)
) {
Row(
//...
) {
//...
}
}