code: private void obtainShowPreview(@NonNull final TypedArray typedArray) {
          boolean defaultValue = getContext().getResources()
                  .getBoolean(R.bool.color_picker_preference_default_show_preview);
          showPreview(typedArray
                  .getBoolean(R.styleable.AbstractColorPickerPreference_showPreview, defaultValue));
      }
docs: Obtains the boolean value, which specifies, whether a preview of the preference's color
  should be shown, or not, from a specific typed array.
  
  @param typedArray
  The typed array, the boolean value should be obtained from, as an instance of the
  class {@link TypedArray}. The typed array may not be null