:rocket: Accompanist v0.4.0 has been released. The big feature is the new animated insets support (...
c
πŸš€ Accompanist v0.4.0 has been released. The big feature is the new animated insets support (keyboard animations). ⌨️ https://github.com/chrisbanes/accompanist/releases/tag/v0.4.0
πŸ‘ 7
πŸŽ‰ 25
a
Copy code
ProvideWindowInsets(windowInsetsAnimationsEnabled = true) {
                Box(Modifier.fillMaxSize()) {
                    TextField(
                        value = "test",
                        onValueChange = {},
                        modifier = Modifier
                            .align(Alignment.BottomCenter)
                            .navigationBarsWithImePadding()
                            .padding(bottom = 50.dp)
                    )
                }
            }
shouldnt the TextField be above the Keyboard ?
c
You’re missing the
WindowCompat.setDecorFitsSystemWindows(window, false)
Oh, and you also need to manually set
android:windowSoftInputMode="adjustResize"
on the activity
a
ah i wasnt ware there are even samples, super nice thank you πŸ™
c
It is but it's hidden. I'll add this to the docs, and see if I can make it a runtime exception
πŸ’ͺ 2
Thanks for flagging btw. I'm just merged in some improved docs: https://chrisbanes.github.io/accompanist/insets/. (PR: https://github.com/chrisbanes/accompanist/pull/161)
πŸ‘ 1