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

https://github.com/wheely/android-day-time-picker

Day Time Picker Widget
https://github.com/wheely/android-day-time-picker

Last synced: 12 months ago
JSON representation

Day Time Picker Widget

Awesome Lists containing this project

README

          

Widget for choosing Day and Time for Android apps with flexible configuration

Add repository:
```groovy
repositories {
maven { url 'https://jitpack.io' }
}
```
Add the dependency
```groovy
dependencies {
implementation 'com.github.wheely:android-day-time-picker:1.0.2'
}
```
Sample usage
```xml

```
```kotlin
val dayTimePicker: DayTimePicker = findViewById(R.id.day_time_picker)
val currentTime = LocalDateTime.of(1993, Month.SEPTEMBER, 3, 21, 21)
val startTime = LocalDate.of(1993, Month.SEPTEMBER, 2).atStartOfDay()
val dayFormatter = DateTimeFormatterBuilder().appendPattern("d MMMM YYYY").toFormatter()

dayTimePicker.setDateTimeParams(
startTime,
currentTime,
Duration.ofDays(3)
) { dayFormatter.format(it) }
dayTimePicker.onUserSelected = { time: LocalDateTime ->
// handle time
}
```