I have an activity with `adjustResize` mode and a ...
# compose
d
I have an activity with
adjustResize
mode and a
Column
with
verticalScroll
and a
TextField
inside, and when I click on the text field, keyboard obscures it, no scrolling happens. This is the latest beta. Is this a known bug/limitation? See code I use in the thread.
Copy code
setContent {
  MyAppTheme {
    Surface(color = MaterialTheme.colors.background) {
      Column(
        modifier = Modifier.verticalScroll(rememberScrollState())
      ) {
        Greeting("Android")
        TextField(
          modifier = Modifier.padding(top = 400.dp),
          value = "",
          onValueChange = {}
        )
      }
    }
  }
}
If I manually scroll up, the text field is there → scrolling works, but not happens automatically as it does in the View system.
l
Yeah it looks like there’s no automatic scroll to the views - you’d have to implement that on your own.
RelocationRequester
sounds like a good use here
d
Thank you, will research it
t
Modifier .relocationRequester(relocate) .onFocusEvent { state -> when { state.isFocused -> scope.launch { while (!ime.isVisible || ime.animationInProgress) delay(16) relocate.bringIntoView() } } }
b
it did not work for me