PopupWindow overlaps soft buttons on Android 5.0 -


i have simple popupwindow create following code (the code in c#, java code should same)

view popupview = layoutinflater.from(this.activity).inflate(resource.layout.lectionfooter, null);  var popup = new popupwindow(popupview, viewgroup.layoutparams.matchparent,      viewgroup.layoutparams.wrapcontent, false) {     outsidetouchable = true,     animationstyle = resource.style.footeranimation };  popup.setbackgrounddrawable(new bitmapdrawable()); popup.showatlocation(rootview, gravityflags.bottom, 0, 0); 

on pre-lollipop devices, popup looks fine, on android 5.0, popup overlaps soft buttons:

popupwindow lollipop

here's popupwindow on android 4.4 device:

enter image description here

does have idea why happens , how can fixed?

this possible bug in android api 21 that's why introduced popup.setattachedindecor(true/false); method in api 22 there workout, can set right y coordinate popup follows:

rect rect = new rect(); getwindow().getdecorview().getwindowvisibledisplayframe(rect); int winheight = getwindow().getdecorview().getheight(); popup.showatlocation(rootview, gravity.bottom, 0, winheight-rect.bottom); 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -