判断状态栏是否可见

2019-01-02  本文已影响0人  卜卜Bruce
    public static boolean isStatusBarShown(Activity context) {
         WindowManager.LayoutParams params = context.getWindow().getAttributes();
         int paramsFlag = params.flags & (~WindowManager.LayoutParams.FLAG_FULLSCREEN);
         return paramsFlag == params.flags;
    }
上一篇下一篇

猜你喜欢

热点阅读