注意:一定要在view.post(Runnable) 在Runnable里执行
CODE:
private int getStatueBarHeight() {
Rect frame = new Rect();
getWindow().getDecorView().getWindowVisibleDisplayFrame(frame);
return frame.top;
}
获取状态栏高度的代码实现
注意:一定要在view.post(Runnable) 在Runnable里执行
CODE:
private int getStatueBarHeight() {
Rect frame = new Rect();
getWindow().getDecorView().getWindowVisibleDisplayFrame(frame);
return frame.top;
}
1434
4968

被折叠的 条评论
为什么被折叠?