is there a way write a composable screen which support keyboard awareness, which mean when keyboard ...
s
is there a way write a composable screen which support keyboard awareness, which mean when keyboard show or hide, it will re-compose.
z
I don’t know if it comes built-in, but you could use the recent Android keyboard controller APIs (i think introduced in android 10?) to observe changes to window insets/keyboard state. Accompanist has support for observing window insets. For the low-level apis see this blog post
1
a
generally you want to key off of things like available space rather than presence or absence of a soft keyboard. Between chromeos devices running android apps and compose for desktop, "soft keyboard showing" isn't a good signal for much of anything.
☝🏻 1