code: View createPresetsView() {
      View contentView = View.inflate(getActivity(), R.layout.cpv_dialog_presets, null);
      shadesLayout = (LinearLayout) contentView.findViewById(R.id.shades_layout);
      transparencySeekBar = (SeekBar) contentView.findViewById(R.id.transparency_seekbar);
      transparencyPercText = (TextView) contentView.findViewById(R.id.transparency_text);
      GridView gridView = (GridView) contentView.findViewById(R.id.gridView);
  
      loadPresets();
  
      if (showColorShades) {
        createColorShades(color);
      } else {
        shadesLayout.setVisibility(View.GONE);
        contentView.findViewById(R.id.shades_divider).setVisibility(View.GONE);
      }
  
      adapter = new ColorPaletteAdapter(new ColorPaletteAdapter.OnColorSelectedListener() {
        @Override public void onColorSelected(int newColor) {
          if (color == newColor) {
            // Double tab selects the color
            ColorPickerDialog.this.onColorSelected(color);
            dismiss();
            return;
          }
          color = newColor;
          if (showColorShades) {
            createColorShades(color);
          }
        }
      }, presets, getSelectedItemPosition(), colorShape);
  
      gridView.setAdapter(adapter);
  
      if (showAlphaSlider) {
        setupTransparency();
      } else {
        contentView.findViewById(R.id.transparency_layout).setVisibility(View.GONE);
        contentView.findViewById(R.id.transparency_title).setVisibility(View.GONE);
      }
  
      return contentView;
    }
docs: region Presets Picker