https://github.com/ehsunshine/colored-time-selector
A smart colored time selector. Users can select just free time with a handy colorful range selector.
https://github.com/ehsunshine/colored-time-selector
colored range selector time
Last synced: 3 months ago
JSON representation
A smart colored time selector. Users can select just free time with a handy colorful range selector.
- Host: GitHub
- URL: https://github.com/ehsunshine/colored-time-selector
- Owner: ehsunshine
- License: gpl-3.0
- Created: 2018-01-01T18:51:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-05T18:41:27.000Z (over 7 years ago)
- Last Synced: 2024-11-07T15:45:07.001Z (8 months ago)
- Topics: colored, range, selector, time
- Language: Kotlin
- Size: 641 KB
- Stars: 152
- Watchers: 5
- Forks: 17
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - ehsunshine/colored-time-selector - A smart colored time selector. Users can select just free time with a handy colorful range selector. (Kotlin)
README
[](https://bintray.com/ehsun/maven/colored-time-range-selector/_latestVersion)
[]( https://android-arsenal.com/details/1/6634 )
[](https://github.com/ehsunshine/colored-time-selector/blob/master/LICENSE)
[](https://travis-ci.org/ehsunshine/colored-time-selector)# Colored Time Range Selector
A smart colored time range selector. Users can select just free time with a handy colorful range selector.## Screen Shots
![]()
## Features
- Select a `time range` between 2 hours
- Highlight `available time range` with your desire color
- Select `just free times` in a range
- Two different type of view, with `Selector` and without it## Use it
**build.gradle**
```gradle
dependencies {
implementation 'de.ehsun.coloredtimebar:coloredtimebar:1.0'
}
```In your layout use the ColoredTimeBar as below:
```xml
```
In your code you can easily set the available time by passing an array of time range string as below:```kotlin
timelineView.setAvailableTimeRange(listOf("07:00 - 10:15", "12:00 - 15:00"))
```
And to enable picker handles use it as below:```xml
```
```kotlin
timelinePicker.setOnSelectedTimeRangeChangedListener { from, to ->
selectedTimeTextView.text = getString(R.string.from_to, from.format(), to.format())
}
```
## Do you like it?
Use it and develop it as you like and buy me a cup of tea :)