I am trying move focus from user textfield to password textfield with imeAction onNext and focusDirection.down, but the focus is cleared when I press the next button of the keyboard. UI image
I show the code here:
val focusManager = LocalFocusManager.current
//we start to implement login screen UI-->
LazyColumn(
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally,
) {
item {
item {
OutlinedTextField(
value = emailValue.value,
keyboardOptions = KeyboardOptions(
imeAction = ImeAction.Next,
keyboardType = KeyboardType.Password
),
keyboardActions = KeyboardActions(
onNext ={
focusManager.moveFocus(FocusDirection.Down)
}
),