code: private void obtainHeaderHeight(@StyleRes final int themeResourceId) {
          TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
                  new int[]{R.attr.materialDialogHeaderHeight});
          int defaultHeight =
                  getContext().getResources().getDimensionPixelSize(R.dimen.dialog_header_height);
          setHeaderHeight(typedArray.getDimensionPixelSize(0, defaultHeight));
      }
docs: Obtains the height of the dialog's header from a specific theme.
  
  @param themeResourceId
  The resource id of the theme, the height should be obtained from, as an {@link
  Integer} value