code: private void obtainItemColor(@StyleRes final int themeResourceId) {
          TypedArray typedArray = getContext().getTheme()
                  .obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogItemColor});
          int defaultColor = ThemeUtil
                  .getColor(getContext(), themeResourceId, android.R.attr.textColorSecondary);
          setItemColor(typedArray.getColor(0, defaultColor));
      }
docs: Obtains the item color from a specific theme.
  
  @param themeResourceId
  The resource id of the theme, the item color should be obtained from, as an {@link
  Integer} value