code: private void obtainDialogPreviewSize(@NonNull final TypedArray typedArray) {
          int defaultValue = getContext().getResources().getDimensionPixelSize(
                  R.dimen.color_palette_preference_default_dialog_preview_size);
          setDialogPreviewSize(typedArray
                  .getDimensionPixelSize(R.styleable.ColorPalettePreference_dialogPreviewSize,
                          defaultValue));
      }
docs: Obtains the size, which should be used to preview colors in the preference's dialog, from a
  specific typed array.
  
  @param typedArray
  The typed array, the size should be obtained from, as an instance of the class {@link
  TypedArray}. The typed array may not be null