AzimoLabs / AndroidKeyboardWatcher

Software keyboard open/close watcher for Android.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong keyboard height on device rotate

erva opened this issue · comments

I have found issue in keyboard height calculation after device rotate.
The solution is to calculate keyboard height initialValue - rootViewRef.get().getHeight() in KeyboardWatcher.GlobalLayoutListener:onGlobalLayout() after keyboard has already finished slide from bottom animation.
I need hotfix for my project right now so I used new Handler().postDelayed(() -> {//onGlobalLayout method content//}, 1000); but there should be better solution

+1 to this.

It's not related to device rotation. The problem is related to the activity being opened when the keyboard is already opened. Typical use case, you use the search bar to look for the app, and you open the app. In this case there is a bug related to the keyboard height.