获取status bar高度

    private int getStatusBarHeight() {

        Rect rectgle = new Rect();

        Window window = getWindow();

        window.getDecorView().getWindowVisibleDisplayFrame(rectgle);

        return rectgle.top;

    }

posted @ 2014-09-19 10:02  feitianlee  阅读(507)  评论(0编辑  收藏  举报