获取屏幕分辨率、宽高
![](https://img-my.csdn.net/uploads/201211/28/1354086767_5252.png)
Android2.3/4.0.4测试没问题,其他未知,待测试之后再做确定:
Rect frame = new Rect();
getWindow().getDecorView().getWindowVisibleDisplayFrame(frame);
int statusBarHeight = frame.top;
getWindow().getDecorView().getWindowVisibleDisplayFrame(frame);
int statusBarHeight = frame.top;