ColorPickerPreference for android to create color picker in preferences. Project created as Library
ColorPickerPreference for android to create color picker in preferences. Project created as Library
Generally used classes by Daniel Nilsson. ColorPickerPreference class by Sergey Margaritov. Packed by Sergey Margaritov. Packed again and made Gradle compatible by Vincent Fischer.
Tested with APIv7, but maybe will work with early versions
You can now install this through Gradle with a simple: ::
implementation 'net.margaritov.preference.colorpicker.ColorPickerPreference:ColorPickerPreference:1.0.0'Paste or clone this library into the /libs folder, in the root directory of your project. Create a new folder: /libs if not already present. (This step is not required - only for keeping cleaner project structure)
Edit settings.gradle by adding the library. You have also define a project directory for the library. Your settings.gradle should look like below:
::
include ':app', ':ColorPickerPreference' project(':ColorPickerPreference').projectDir = new File('app/libs/ColorPickerPreference')
In app/build.gradle add the ColorPickerPreference library as a dependency:
::
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:21.0.3' implementation project(":ColorPickerPreference") }
Sync project, clean and build. You can use the ColorPickerPreference library as part of your project now.
ColorPickerPreference to your application, you must first add a library reference:ColorPickerPreferenceYou can see some tests inside
::
To enable Alpha Slider in your code use function: :: setAlphaSliderEnabled(boolean enable)
No open issues yet, or sync has not completed.