Reputation: 1516
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?
Upvotes: 8
Views: 6116
Reputation: 3756
add to your popWindow Hieght WRAP_CONTENT
popWindow.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);
Upvotes: 0
Reputation: 202
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.
Upvotes: 9
Reputation: 67286
Try using android:windowSoftInputMode="adjustPan"
in your activity tag in the Manifest file
Upvotes: 3