@Override
            public void onGlobalLayout() {
                Rect r = new Rect();
                decorView.getWindowVisibleDisplayFrame(r);
                int screenHeight = decorView.getHeight();
                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_NAVIGATION_BAR) == 0) {
                    r.bottom = screenHeight;
                }
                int keypadHeight = screenHeight - r.bottom;
                if (keypadHeight != specialModeImeHeight) {
                    specialModeImeHeight = keypadHeight;
                    log("    FitSystemBarUtils: specialModeImeHeight=" + specialModeImeHeight);
                    applyCallBack();
                }
            }
Applies this relative padding to the view.
DialogX/src/main/java/com/kongzue/dialogx/util/views/FitSystemBarUtils.java