判断状态栏是否可见

    public static boolean isStatusBarShown(Activity context) {
         WindowManager.LayoutParams params = context.getWindow().getAttributes();
         int paramsFlag = params.flags & (~WindowManager.LayoutParams.FLAG_FULLSCREEN);
         return paramsFlag == params.flags;
    }

你可能感兴趣的:(判断状态栏是否可见)