https://kotlinlang.org logo
#compose
Title
# compose
s

Shakil Karim

02/05/2021, 7:13 PM
@Siyamed Is there any way i can know when keyboard is Visible when using BasicTextField ?
j

jim

02/05/2021, 7:13 PM
cc @Sean McQuillan [G]
s

Siyamed

02/05/2021, 7:14 PM
I thought this is via insets etc @cb
c

cb

02/05/2021, 7:41 PM
Yep, this can be found via insets: https://chrisbanes.github.io/accompanist/insets/
👍 1
🙏 1
s

Sean McQuillan [G]

02/06/2021, 1:19 AM
^ those answers 🙂
@Shakil Karim query for you - why did you expect this API to be part of
BasicTextField
and what shape did you expect?
s

Shakil Karim

02/06/2021, 6:34 AM
@Sean McQuillan [G] So that, i don't have to use another Dependency just to know if keyboard is visible i guess 😁.
👍 1
s

Sean McQuillan [G]

02/22/2021, 10:36 PM
Oh sorry missed reply. That makes sense. Sadly, I think insets is the best source of truth we can get at right now (with backwards compatibility guarantees) so exposing a boolean
isKeyboardShown
is not a guarantee we can actually meet. It's something we discussed adding an API for with https://android-review.googlesource.com/c/platform/frameworks/support/+/1593054 and will make a note that you expected to find this API as it continues to iterate.