Generally used classes by Daniel Nilsson. ColorPickerPreference class by Sergey Margaritov. Packed by Sergey Margaritov.
- Color Area
- Hue Slider
- Alpha Slider (disabled by default)
- Old & New Color
- Color Preview in Preferences List
Tested with APIv7, but maybe will work with early versions
You can see some tests inside
<net.margaritov.preference.colorpicker.ColorPickerPreference android:key="color1" android:title="@string/color1_title" android:summary="@string/color1_summary" android:defaultValue="@integer/COLOR_BLACK" <!-- HEX value also accepted (v1.1) --> alphaSlider="true" <!-- enable alpha slider via XML --> />
To enable Alpha Slider in your code use function:
setAlphaSliderEnabled(boolean enable)