当ModalBottomSheetLayout处于展开状态并且出现键盘时,键盘出现奇怪的UI故障。
@Composable
@OptIn(ExperimentalMaterialApi::class)
fun ModalBottomSheetSample() {
val state = rememberModalBottomSheetState(ModalBottomSheetValue.Hidden, skipHalfExpanded = true)
val scope = rememberCoroutineScope()
ModalBottomSheetLayout(
sheetState = state,
sheetContent = {
Column(modifier = Modifier.verticalScroll(rememberScrollState())) {
repeat(20) {
TextField(value = "", onValueChange = {})
}
}
}
) {
Button(onClick = { scope.launch { state.show() } }) {
Text("Click to show sheet")
}
}
}
这是一个视频https://drive.google.com/file/d/1IMU4kGY3hnixK6bVME1iqH0aPDe4-hjr/view?usp=sharing
有人知道怎么修吗?
1条答案
按热度按时间ztyzrc3y1#
尝试添加
到您的
fragment
/activity