【发布时间】:2022-12-03 14:43:16
【问题描述】:
I want to set the start and end padding to BottomSheetScaffold but as you can see, the borromsheet has extra color in the background and has not had good ui. How can i set padding to bottomsheet?
BoxWithConstraints() {
val maxHeight = maxHeight
val sheetHeight = maxHeight / 4.dp
BottomSheetScaffold(
modifier = modifier
.statusBarsPadding()
.navigationBarsPadding(),
scaffoldState = scaffoldState,
// sheetShape = RoundedCornerShape(topStart = 16.dp, topEnd = 16.dp),
sheetContent = {
},
sheetBackgroundColor = Color.Unspecified,
sheetPeekHeight = 51.dp
) {
Box(modifier = modifier
.fillMaxSize()) {
Column(modifier = modifier
.fillMaxSize()) {
Box(modifier = modifier
.weight(1f)
.background(Color.Cyan)) {
}
}
}
}
}
标签: android android-jetpack-compose bottom-sheet