code: @Override
  	protected void onPrepareDialogBuilder(Builder builder) {
  
  		if (!((getEntries().length == getEntryValues().length) && (getEntries().length == colors.length))) {
  			throw new AssertionError(
  					"ColorListPreference requires a complete entries array, a complete entryValues array and a complete entryColors array");
  		}
  
  		int index = findIndexOfValue(getSharedPreferences().getString(getKey(),
  				"1"));
  
  		ListAdapter listAdapter = new ColorArrayAdapter(getContext(),
  				R.layout.listitem_row, getEntries(), resourceIds, index);
  
  		builder.setAdapter(listAdapter, this);
  		super.onPrepareDialogBuilder(builder);
  	}
docs: {@inheritDoc}