I have a simple sign-in screen with two TextFields...
# compose
m
I have a simple sign-in screen with two TextFields. When I press on either field, the layout scrolls up so that the field is above the Keyboard. So far so good. However, if I request focus with FocusRequester on the TextField (as a result of ImeAction.Next), the cursor moves to the right field, but the layout is not scrolled - the textfield is focused but hidden by keyboard. Any ideas how to cope with that? Compose 1.0.0-beta-06
1
I didn't set
windowSoftInputMode
. If I set it to
adjustPan
it behaves the same. If I set it to
adjustResize
it's not scrolled ever.
using
adjustResize
with Accompanist
ProvideWindowInsets
and
.navigationBarsWithImePadding()
makes the whole view shift the right way and now it's visible, so it's kinda fixed for me 🤷
r
Did you add .navigationBarsWithImePadding() to the modifier of root composable in Activity?
m
I have sth like this
Copy code
ProvideWindowInsets(windowInsetsAnimationsEnabled = true) {

        Box(
            Modifier.fillMaxSize()
        ) {

            Column(
                modifier = Modifier
                    .fillMaxSize()
                    .verticalScroll(rememberScrollState())
                    .navigationBarsWithImePadding(),
It's not root of activity. It is one of the composables which make the nav graph
👍 1