-
-
Save kasem-sm/acaa85fc2a40be07a6c16716012b6169 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun MyScreen() { | |
val focusManager = LocalFocusManager.current | |
Column { | |
// Username Field | |
MyTextField( | |
text = "Enter your username", | |
onTextChange = { /** Update state **/ }, | |
keyboardOptions = KeyboardOptions( | |
imeAction = ImeAction.Next | |
), | |
keyboardActions = KeyboardActions( | |
onNext = { | |
// Pressing Ime button would move the text indicator's focus to the bottom | |
// field, if it exists! | |
focusManager.moveFocus(FocusDirection.Down) | |
} | |
) | |
) | |
// Password Field | |
MyTextField( | |
text = "Enter your Password", | |
onTextChange = { /** Update state **/ }, | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment