code: private void adaptHeaderHeight() {
          if (header != null) {
              ViewGroup.LayoutParams layoutParams = header.getLayoutParams();
              layoutParams.height = headerHeight;
          }
      }
docs: Adapts the height of the dialog's header.