Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rtugeek/ColorSeekBar

A colorful SeekBar for picking color
https://github.com/rtugeek/ColorSeekBar

android color colorpicker custom-view customview seekbar ui

Last synced: about 1 month ago
JSON representation

A colorful SeekBar for picking color

Awesome Lists containing this project

README

        

![ColorSeekbar](https://github.com/Tobaloidee/ColorSeekBar/blob/master/logo/colorseekbar-02.png)

### ScreenShot:


### ColorSeekbar Attrs

```xml









```

### AlphaSeekbar Attrs

```xml
















```

### Gradle:

![Release](https://jitpack.io/v/rtugeek/colorseekbar.svg)
![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg?style=flat)
![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-ColorSeekBar-green.svg?style=true)

Step 1. Add the JitPack repository in your root build.gradle at the end of repositories:

```
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```

Step 2. Add the dependency

```
implementation 'com.github.rtugeek:colorseekbar:2.0.3'
```

## Usage

XML

```xml

```

Kotlin

```kotlin
colorSeekBar.maxProgress = 1000
colorSeekBar.progress = 50
colorSeekBar.borderColor = Color.BLACK
colorSeekBar.borderRadius = 10
colorSeekBar.borderSize = 10
colorSeekBar.thumbDrawer = DefaultThumbDrawer(30,Color.WHITE,Color.BLUE)
colorSeekBar.isVertical = false
colorSeekBar.barHeight = 10
colorSeekBar.color = Color.BLACK // or colorSeekBar.progress = 100
//lock thumb
colorSeekBar.isEnabled =false

alphaSeekBar.maxProgress = 1000
alphaSeekBar.borderColor = Color.BLACK
alphaSeekBar.borderRadius = 10
alphaSeekBar.borderSize = 10
alphaSeekBar.thumbDrawer = DefaultThumbDrawer(30,Color.WHITE,Color.BLUE)
alphaSeekBar.isVertical = false
alphaSeekBar.barHeight = 10
alphaSeekBar.alphaValue = 255 // or alphaSeekBar.progress = 100

```

Listener

```java
colorSeekBar.setOnColorChangeListener { progress, color ->
Log.i("TAG", "===progress:$progress-color:$color===")
}

alphaSeekBar.setOnAlphaChangeListener { progress, alpha ->
Log.i("AlphaSeekBarFragment", "===progress:$progress-alpha:$alpha===")
}
```

Thumb Drawer
- com.rtugeek.android.colorseekbar.thumb.DefaultThumbDrawer
- com.rtugeek.android.colorseekbar.thumb.DrawableThumbDrawer - Load thumb from drawable resource
- com.rtugeek.android.colorseekbar.thumb.ThumbDrawer - Implement this interface if you want to customize thumb

## Vertical Bar

```xml

```

**Spread the word**



## License

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Leon Fu

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.