I need a text field in jetpack compose that works with a mask like this: NNNNN-NNN where N is an integer from 0 to 9. I need my composable function to have this mask in the OutlinedTextField :
@Composable
private fun EditTextField(
labelText: String,
value: String,
keyboardType: KeyboardType = KeyboardType.Text,
onValueChanged: (String) -> Unit
) {
OutlinedTextField(
modifier = Modifier.padding(top = 8.dp),
label = { Text(text = labelText) },
keyboardOptions = KeyboardOptions(keyboardType = keyboardType),
value = value,
onValueChange = onValueChanged
)
}
