Android中获取通知信息栏的高度:
1.
private int getStatusBarHeight(){
Rect rect = new Rect();
getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);
return rect.top;
}
2.
public static int getStatusBarHeight() {
return Resources.getSystem().getDimensionPixelSize(
Resources.getSystem().getIdentifier("status_bar_height", "dimen", "android"));
}