yshrsmz / KeyboardVisibilityEvent

Android Library to handle software keyboard visibility change event.
Apache License 2.0
1.74k stars 171 forks source link

Keyboard state in certain device is not accurate #24

Open gcrescent opened 6 years ago

gcrescent commented 6 years ago

Hi, I am using your library for some time and it works great, but recently one of my user report a strange behaviour.

Here are the details:

  1. Device name: Essential ph-1 phone
  2. Android version 7.1.1
  3. Use default keyboard, not custom
  4. I use windowSoftInputMode adjustResize

I use the event listener to hide a button when the keyboard is open, I think somehow this device detect the keyboard is open when it is not (the activity just started, and it don't show keyboard on start). Do you have any idea what cause this? Thanks

yshrsmz commented 6 years ago

Thanks for reporting.

Since Essential Phone's display form factor is a bit different from other devices, maybe the threshold we currently use is not enough(or too much) for the device.

You can try adjust this value to see the difference

egek92 commented 6 years ago

is this working in 3rd party keyboards?

anoop44 commented 6 years ago

@egek92 It should be working for 3rd Party Keyboards as well since it is independent of the keyboard. It checks only the change in height of rootview. It might not work for certain keyboards if their height is really low that is lower than the threshold.