I using the code below to show a PopupWindow but it not work well.
View view = getWindow().getDecorView().getRootView();
popupWindow.showAtLocation(view, Gravity.NO_GRAVITY, 0, 0);
result in Custom Phone API 25 (it work well)

popupWindow.showAtLocation(view, Gravity.NO_GRAVITY, 0, 30);
result in Custom Phone API 25 (PopupWindow is as same as set y=0 even we set it = 30)

popupWindow.showAtLocation(view, Gravity.NO_GRAVITY, 0, 60);
result in Custom Phone API 25 (PopupWindow have margin top)

popupWindow.showAtLocation(view, Gravity.NO_GRAVITY, 0, 60);
result in Google Nexus 5 API 21 (PopupWindow above status bar)

I want to show a PopupWindow below status bar 20dp in all devices. Any help or suggestion would be great appreciated.