Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PopupWindow above Virtual keyboard

I have a PopupWindow that is shown when a user is typing in an EditText. This popup offers him some suggestions. My problem is that when the Popup is shown, a part of it is displayed over the Keyboard on the screen, preventing the user to continue typing. Does anyone know why of this behaviour and how could I fix it?

like image 732
pane619 Avatar asked Mar 04 '12 18:03

pane619


2 Answers

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);
like image 126
Chetna Avatar answered Oct 04 '22 16:10

Chetna


popupWindow.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);

This is working with lollipop

like image 45
Aram Avatar answered Oct 04 '22 16:10

Aram