mopsicus / umi

Unity mobile input (UMI) plugin for Android and iOS, allows to use features of mobile native input fields
MIT License
386 stars 91 forks source link

Fixing: keyboard height changed event trigger #97

Closed oahceh closed 7 months ago

oahceh commented 2 years ago

On some Android OS, the ViewTreeObserver trigger layout change event serveral times not just one time while the keyboard appearing, the keyboard height computed in one of the KeyboardProvider.handleOnGlobalLayout calls is not the real height of keyboard, and the KeyboardListener send the message to Unity only when the keyboard show status changed. So i just add a condition in KeyboardListener.onKeyboardHeight to make it send message to Unity when show status or height change.