Is there a compose multiplatform way to detect sof...
# compose
m
Is there a compose multiplatform way to detect soft keyboard visibility state? Something like the Compose Android-only
WindowInsets.isImeVisible
I tried monitoring
WindowInsets.ime.getBottom(LocalDensity.current)
but this seems to always be same value (1005) regardless (on iOS)
w
WindowInsets.ime.getBottom(LocalDensity.current)
returns 0 when the IME is closed.
m
The bug is that sometimes (depending on the layout) it doesn’t. I’ve added
LaunchedEffect
with 3 second delay and then checks bottom ime padding and it returns 1005 with no keyboard visible.