Skip to content

Commit

Permalink
Release a new version 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Sep 3, 2020
1 parent e2ad350 commit 6ad26a1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ allprojects {
And add below dependency code to your **module**'s `build.gradle` file.
```gradle
dependencies {
implementation "com.github.skydoves:colorpickerview:2.1.9"
implementation "com.github.skydoves:colorpickerview:2.2.0"
}
```

Expand Down Expand Up @@ -86,6 +86,8 @@ app:selector_size="32dp" // sets a width & height size of the selector.
app:alpha_selector="0.8" // sets an alpha of thr selector.
app:alpha_flag="0.8" // sets an alpha of the flag.
app:actionMode="last" // sets action mode 'always' or 'last'.
// set an initial position of the selector using a specific color. This attribute will work with only a default HSV palette.
app:initialColor="@color/colorPrimary"
app:preferenceName="MyColorPicker" // sets a preference name.
app:debounceDuration="200" // sets a debounce duration of the invoking color listener.
```
Expand Down Expand Up @@ -172,6 +174,19 @@ ColorPickerView colorPickerView = new ColorPickerView.Builder(context)
.build();
```

### Initial color
We can set an initial color and set positions of selector and slideBars based on the initial color.<br>
This function will work only with a default HSV palette.<br>
If we set preference name using the `setPreferenceName` method, this function will work only once.
```gradle
app:initialColor="@color/colorPrimary"
```
Or we can use this method programmatically.
```java
.setInitialColor(color);
.setInitialColorRes(R.color.colorPrimary);
```

### Restore and save
This is how to restore the state of `ColorPickerView`.<br>
`setPreferenceName()` method restores all of the saved states (selector, color) automatically.
Expand Down
6 changes: 3 additions & 3 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
ext.versions = [
minSdk : 15,
compileSdk : 30,
versionoCode : 23,
versionName : '2.1.9',
versionoCode : 24,
versionName : '2.2.0',

gradleBuildTool : '3.6.3',
spotlessGradle : '5.1.1',
spotlessGradle : '5.3.0',
bintrayRelease : '0.9.2',

androidxAppcompat: '1.2.0',
Expand Down

0 comments on commit 6ad26a1

Please # to comment.