Skip to content
This repository has been archived by the owner on Mar 5, 2018. It is now read-only.

Latest commit

 

History

History
51 lines (37 loc) · 1.26 KB

README.rst

File metadata and controls

51 lines (37 loc) · 1.26 KB

BREAKING

latest year/two I comletely away from android development, so i need someone, who will take care of this library

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="@color/pumpkin_orange"    <!-- integer resources are also accepted -->
    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