Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.sapuseven:color-picker-view:'
}
dependencies {
implementation("com.github.sapuseven:color-picker-view:")
}
<dependency>
<groupId>com.github.sapuseven</groupId>
<artifactId>color-picker-view</artifactId>
<version></version>
</dependency>
libraryDependencies += "com.github.sapuseven" % "color-picker-view" % ""
:dependencies [[com.github.sapuseven/color-picker-view ""]]
A simple good looking color picker component for Android
A color picker is something that has always been missing from the standard set of components which developers can build their user interface in Android with.
This is a fork from @danielnilsson9 for my own projects, primarily BetterUntis. You can still use this library for any other projects to benefit from the modifications (see below).
(these do not include the modifications by @andre99 and this fork)
<img src="https://cloud.githubusercontent.com/assets/5458667/7705688/079f4872-fe46-11e4-9c0c-a0083bac8d10.png" alt="Screenshot1" width="240"> <img src="https://cloud.githubusercontent.com/assets/5458667/7705689/07a0673e-fe46-11e4-94c8-49a980e7d1b5.png" alt="Screenshot2" width="460">You can use JitPack to quickly include this project.
Step 1: Add the JitPack repository to your build file
Add this in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2: Add the dependency
This goes into the module-level build.gradle dependencies:
dependencies {
...
implementation 'com.github.SapuSeven:color-picker-view:v1.5.0'
}
For documentation about how to use the library, check the demo app included in this project.
There are basically three different ways to use this color picker. You can add it to your preferences using the ColorPreference class. You can also use it as a DialogFragment using the ColorPickerDialogFragment. Or you can simply use the ColorPickerView to add the color picker anywhere you want in you application. All three cases are demonstrated in the demo app, please refer to the demo for more information.