Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
ColorPickerPreference for android to create color picker in preferences. Project created as Library
branch: master

This branch is 40 commits behind attenzione:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
res
src/net/margaritov/preference/colorpicker
.gitignore
AndroidManifest.xml
CHANGELOG.rst
LICENSE
README.rst
proguard.cfg
project.properties
screen_1.png
screen_2.png

README.rst

ColorPickerPreference

Generally used classes by Daniel Nilsson. ColorPickerPreference class by Sergey Margaritov. Packed by Sergey Margaritov.

Features

  • Color Area
  • Hue Slider
  • Alpha Slider (disabled by default)
  • Old & New Color
  • Color Preview in Preferences List

Requirements

Tested with APIv7, but maybe will work with early versions

Usage

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)

Screens

  • https://github.com/attenzione/android-ColorPickerPreference/raw/master/screen_1.png
  • https://github.com/attenzione/android-ColorPickerPreference/raw/master/screen_2.png
Something went wrong with that request. Please try again.