Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android popupwindow is above virtual keyboard

I have a popup window with an adview appearing at the bottom or my screen. I am doing it this way so the user can click an x to close the ad.

When the virtual keyboard comes up when the popUpWindow is active, the ad is still visible. How can I make the keyboard take precidence over the popUpWindow or tell the popUpWindow to not be on the very top?

like image 589
Jeremey Avatar asked Dec 13 '11 04:12

Jeremey


2 Answers

You have to set setInputMethodMode(INPUT_METHOD_NEEDED) on the popup window before calling it, then the popup will show behind the keyboard. If you have also defined setHeight(WindowManager.LayoutParams.WRAP_CONTENT) on the popup, then it will even resize when the keyboard is hidden or shown again.

like image 197
androidCoder Avatar answered Nov 15 '22 04:11

androidCoder


Try using android:windowSoftInputMode="adjustPan" in your activity tag in the Manifest file

like image 41
Lalit Poptani Avatar answered Nov 15 '22 04:11

Lalit Poptani