I want to disable capitalization on my OutlinedTextField that i want to be of an email type. Obviously this email type should have capitalization disabled. So here is what I tried and with no effect (still first letter starts with uppercase):
@Composable
fun FormTextFieldsLogin() {
OutlinedTextField(keyboardOptions = KeyboardOptions(
capitalization = KeyboardCapitalization.None,
keyboardType = KeyboardType.Email,
imeAction = ImeAction.Next
), value = etEmail, onValueChange = { etEmail = it }, label = { Text("Email") }, leadingIcon = { Image(painter = painterResource(id = R.drawable.person), contentDescription = "email") })
}
capitalizationcontrols the automatic capitalization. This still means the user can capitalize anything they want, it just won't happen autoatically whenNoneis specified. Further more, this ist just a request, the keyboard can ignore this request, so you don't even have a guarantee anything will happen at all using this option. If you want to force it, you need a different approach by converting everything that was entered after the fact. Please edit the question to specify what you really want to achieve.