Slide 20
Slide 20 text
4. PINコード入力: TextField
BasicTextField(
value = text,
onValueChange = { newValue ->
if (newValue.length <= MaxDigits) {
text = newValue
}
},
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.NumberPassword),
interactionSource = interactionSource,
modifier = modifier.border(1.dp, contentColor, RoundedCornerShape(8.dp))
) {
CompositionLocalProvider(LocalContentColor provides contentColor) {
PinDigits(text, interactionSource.collectIsFocusedAsState().value)
}
} 20