code: private void adaptLayoutParams() {
          DialogRootView rootView = getRootView();
  
          if (getWindow() != null && rootView != null) {
              rootView.setLayoutParams(createLayoutParams());
              rootView.setFullscreen(isFullscreen());
              rootView.setMaxWidth(getMaxWidth());
              rootView.setMaxHeight(getMaxHeight());
          }
      }
docs: Adapts the layout params of the dialog.