获取status bar高度

时间:2014-09-19 11:35:25   收藏:0   阅读:297

    private int getStatusBarHeight() {

        Rect rectgle = new Rect();

        Window window = getWindow();

        window.getDecorView().getWindowVisibleDisplayFrame(rectgle);

        return rectgle.top;

    }

原文:http://www.cnblogs.com/feitianlee/p/3980786.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!