android - How to get softkeyboard height in float window correctly -
here tried measure soft keyboard in full screen mode float window add layoutchangelistener root view this: monlayoutchangelistner = new view.onlayoutchangelistener() { @override public void onlayoutchange(view v, int left, int top, int right, int bottom, int oldleft, int oldtop, int oldright, int oldbottom) { rect r = getframevisiblepart(); if (ismaybekeyboard(r)) { onkeyboardshow(r.bottom, screenheight - r.bottom); } else if (iskeyboardmaybehide(r)) { onkeyboardhide(); } } }; mrootview.addonlayoutchangelistener(monlayoutchangelistner); getframevisiblepart: private rect getframevisiblepart() { rect r = new rect(); mrootview.getwindowvisibledisplayframe(r); return r; } and here window params: context context = app.getinstance(); windowmanager.layoutparams params = new windowmanager.layoutparams(); if (build.version.sdk_int >= 19) { ...