samples-keyboardheight
samples-keyboardheight copied to clipboard
Calculates the height of a floating soft input Android keyboard
when i test this code in the xiaomi devices,i find the height is not accurate。in some case,the activity window size is too larger include the top status bar,in other case,...
In HUAWEI ELE-AL00,android 9,api28。 onKeyboardHeightChanged always not be called,when use adjustNothing
Our suggestion is : ` int orientation = getScreenOrientation(); int topCutoutHeight = 0; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { topCutoutHeight = getTopCutoutHeight(); } int keyboardHeight = screenSize.y + topCutoutHeight - rect.bottom;...
Only tested this phone, but `onKeyboardHeightChanged` isn't called at all when in landscape.