Chris Fillmore
10/12/2021, 5:37 PMBasicTextField
and TextField
with respect to cursor placement and/or LTR/RTL behaviour? The code below produces a text field where the cursor stays to the left, and thus text comes out “backwards” as you type. A TextField
with the same parameters works as expected. Thanks!
BasicTextField(
value = TextFieldValue(text),
onValueChange = { onValueChange(it.text) },
textStyle = TextStyle.Default.copy(
color = Color.White,
fontSize = fontSize.em,
fontWeight = FontWeight.Bold,
),
enabled = /* calculated from some state */,
modifier = Modifier
.fillMaxWidth()
.padding(16.dp),
keyboardOptions = KeyboardOptions(
autoCorrect = false,
),
)
Chris Fillmore
10/12/2021, 7:08 PMvar textFieldValueState by remember { mutableStateOf(TextFieldValue(text = value)) }
val textFieldValue = textFieldValueState.copy(text = value)