int[] mColors = getResources().getIntArray(R.array.default_rainbow);
ColorPickerDialog dialog = ColorPickerDialog.newInstance(R.string.color_picker_default_title,
mColors,
mSelectedColor,
5, // Number of columns
ColorPickerDialog.SIZE_SMALL,
true // True or False to enable or disable the serpentine effect
//0, // stroke width
//Color.BLACK // stroke color
);
dialog.setOnColorSelectedListener(new ColorPickerSwatch.OnColorSelectedListener() {
@Override
public void onColorSelected(int color) {
mSelectedColor = color;
textView.setTextColor(mSelectedColor);
Intent intent = new Intent(MainActivity.this, SettingsActivity.class);
startActivity(intent);
}
});