When screen size is varies means BlurPopup window background is not fully covered.
Opened this issue · 1 comments
gopinathan1202 commented
MustanserIqbal93 commented
I have fixed it with the following code.
In BlurPopupWindow class I have modified the following method
actually the navigation height was coming to big. So I have fixed with following code.
private static int getNaviHeight(Activity activity) {
if (activity == null) {
return 0;
}
Display display = activity.getWindowManager().getDefaultDisplay();
int contentHeight = activity.getResources().getDisplayMetrics().heightPixels;
int realHeight = 0;
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
final DisplayMetrics metrics = new DisplayMetrics();
display.getRealMetrics(metrics);
realHeight = metrics.heightPixels;
} else {
try {
Method mGetRawH = Display.class.getMethod("getRawHeight");
realHeight = (Integer) mGetRawH.invoke(display);
} catch (Exception e) {
e.printStackTrace();
}
}
if (contentHeight == realHeight) {
return 0;
}
int navigationBarHeight = 0;
int resourceId = activity.getResources().getIdentifier("navigation_bar_height", "dimen", "android");
if (resourceId > 0) {
navigationBarHeight = activity.getResources().getDimensionPixelSize(resourceId);
}
return navigationBarHeight;
//return realHeight - contentHeight;
}