Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/rtugeek/ColorSeekBar
- Owner: rtugeek
- Created: 2016-02-01T06:15:51.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-10-25T12:04:56.000Z (about 1 year ago)
- Last Synced: 2024-11-04T19:08:22.809Z (about 2 months ago)
- Topics: android, color, colorpicker, custom-view, customview, seekbar, ui
- Language: Java
- Homepage: https://github.com/rtugeek/ColorSeekBar
- Size: 2.26 MB
- Stars: 345
- Watchers: 16
- Forks: 59
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-android-ui - https://github.com/rtugeek/ColorSeekBar
- awesome-android-ui - https://github.com/rtugeek/ColorSeekBar
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 =falsealphaSeekBar.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 2004Copyright (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 MODIFICATION0. You just DO WHAT THE FUCK YOU WANT TO.