code: private void initialize(@StyleRes final int themeResourceId) {
          int themeId = themeResourceId;
  
          if (themeId == 0) {
              TypedValue typedValue = new TypedValue();
              getContext().getTheme().resolveAttribute(R.attr.materialDialogTheme, typedValue, true);
              themeId = typedValue.resourceId;
              themeId = themeId != 0 ? themeId : R.style.MaterialDialog_Light;
          }
  
          setContext(new ContextThemeWrapper(getContext(), themeId));
          this.themeResourceId = themeId;
          obtainStyledAttributes(themeId);
      }
docs: Initializes the builder.
  
  @param themeResourceId
  The resource id of the theme, which should be used by the dialog, as an {@link
  Integer} value or 0, if the default theme should be used