private int getStatusBarHeight() {
        if (isFullScreen() || getDecorView() == null) {
            return 0;
        }
        WindowInsetsController insetsController = (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) ? getDecorView().getWindowInsetsController() : null;
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && insetsController != null && (insetsController.getSystemBarsBehavior() & View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR) == 0) {
            return 0;
        }
        Resources res;
        if (contentView == null || contentView.getContext() == null) {
            res = Resources.getSystem();
        } else {
            res = contentView.getContext().getResources();
        }
        int result = 0;
        int resourceId = res.getIdentifier("status_bar_height", "dimen", "android");
        if (resourceId > 0) {
            result = res.getDimensionPixelSize(resourceId);
        }
        return result;
    }
Applies this relative padding to the view.
DialogX/src/main/java/com/kongzue/dialogx/util/views/FitSystemBarUtils.java