spierce7
05/29/2021, 7:33 PMOutlinedTextField
. I can’t seem to find a good way.spierce7
05/29/2021, 7:33 PMval userState = remember { mutableStateOf(TextFieldValue()) }
OutlinedTextField(
value = userState.value,
onValueChange = { userState.value = it },
label = {
Text("User")
},
)
Spacer(Modifier.height(10.dp))
val passwordState = remember { mutableStateOf(TextFieldValue()) }
val hidePassword = remember { mutableStateOf(true) }
OutlinedTextField(
value = passwordState.value,
onValueChange = { passwordState.value = it },
label = { Text("Password") },
visualTransformation = if (hidePassword.value) PasswordVisualTransformation() else VisualTransformation.None,
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password),
)
Kirill Grouchnikov
05/29/2021, 10:10 PMOutlinedTextField
is not up to the Material Design spec from https://material.io/components/text-fields#outlined-text-fieldspierce7
05/29/2021, 11:42 PMDenis Ismailaj
05/30/2021, 2:03 PMsingleLine
to true for the label to be centeredspierce7
05/31/2021, 5:52 AMsingleLine = true
fixes it. Closing the ticket.