PopupWindow above Virtual keyboard

╄→尐↘猪︶ㄣ 提交于 2019-12-03 23:30:19

To have your popupwindow behind the softkeyboard just set this line:

popupWindow.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);

and also

popupWindow.setFocusable(false);
popupWindow.setOutsideTouchable(false);

try this

popupWindow = new PopupWindow(popupView, WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT,true);
Srikanth Goli

try using

PopupWindow.showAtLocation(View parent, int gravity, int x, int y)

instead of

PopupWindow.showAsDropDown (View anchor)

popupWindow.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);

This is working with lollipop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!