我的代码如下。
// 模态底部表单状态
val modalBottomSheetState = rememberModalBottomSheetState(
skipPartiallyExpanded = true
)
Run Code Online (Sandbox Code Playgroud)
//来自基本文本字段的自定义 OTP 字段。
CustomOtpField(
text = accessPin,
onTextChanged = {
if (it.isEmpty()) accessPin = it
it.lastOrNull()?.let { mChar ->
if (!(mChar == '.' || mChar == ' ')) {
if (it.length <= 4) {
accessPin = it
}
}
}
},
keyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Number,
imeAction = ImeAction.Done
)
)
Run Code Online (Sandbox Code Playgroud)
我需要省略间隙。任何帮助将不胜感激。
android kotlin android-jetpack-compose jetpack-compose-modalbottomsheet