nglauber
11/02/2021, 5:27 PMBringIntoViewRequester
works in the following situation:
1. TextField
is at the bottom of the screen and the user tap on it and it gain focus.
2. System keyboard is displayed and the TextField
becoming visible because of the following:
Modifier.bringIntoViewRequester(bringIntoViewRequester)
.onFocusChanged {
if (it.isFocused) {
coroutineScope.launch {
delay(300)
bringIntoViewRequester.bringIntoView()
}
}
}
3. The user now press the system back key and the keyboard is closed, but the TextField
still has focus.
4. Finally, if the user tap on the TextField
again. The keyboard is opened on top of the TextField
and the BringIntoViewRequester
is not triggered again because the focus haven’t changed.
I know there’s a ticket kinda related to this…
https://issuetracker.google.com/u/0/issues/192043120
Any suggestion?rsktash
11/02/2021, 7:21 PMonFocusEvent
nglauber
11/02/2021, 7:55 PMonFocusEvent
is triggered several times.rsktash
11/02/2021, 8:00 PM.onFocusEvent { state ->
if (state.isFocused) { ...
nglauber
11/02/2021, 10:53 PM