Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/commandiron/WheelPickerCompose
Add Wheel Date - Time Picker in Android Jetpack Compose.
https://github.com/commandiron/WheelPickerCompose
android android-lib android-sdk android-sdk-library compose-library date-picker jetpack-compose kotlin kotlin-library library picker time-picker uiview wheel-picker wheelpicker
Last synced: 4 months ago
JSON representation
Add Wheel Date - Time Picker in Android Jetpack Compose.
- Host: GitHub
- URL: https://github.com/commandiron/WheelPickerCompose
- Owner: commandiron
- License: apache-2.0
- Created: 2022-09-07T22:35:00.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-12T12:50:28.000Z (over 1 year ago)
- Last Synced: 2023-11-07T15:11:06.191Z (about 1 year ago)
- Topics: android, android-lib, android-sdk, android-sdk-library, compose-library, date-picker, jetpack-compose, kotlin, kotlin-library, library, picker, time-picker, uiview, wheel-picker, wheelpicker
- Language: Kotlin
- Homepage:
- Size: 14.2 MB
- Stars: 304
- Watchers: 5
- Forks: 36
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jetpack-compose-awesome - WheelPickerCompose - Wheel Date & Time Picker for Jetpack Compose. (Libraries / UI)
- jetpack-compose-awesome - WheelPickerCompose - Wheel Date & Time Picker for Jetpack Compose. (Libraries / UI)
README
# WheelPickerCompose [![](https://jitpack.io/v/commandiron/WheelPickerCompose.svg)](https://jitpack.io/#commandiron/WheelPickerCompose)
Add Wheel Date - Time Picker in Android Jetpack Compose.
## Usage
|Picker|Usage|
|------|-----|
||```WheelDateTimePicker { snappedDateTime -> }```|
||```WheelDatePicker { snappedDate -> }```|
||```WheelTimePicker { snappedTime -> }```|
||```WheelTimePicker(timeFormat = TimeFormat.AM_PM) { snappedTime -> }```|## Features
```kotlin
WheelDateTimePicker(
startDateTime = LocalDateTime.of(
2025, 10, 20, 5, 30
),
minDateTime = LocalDateTime.now(),
maxDateTime = LocalDateTime.of(
2025, 10, 20, 5, 30
),
timeFormat = TimeFormat.AM_PM,
size = DpSize(200.dp, 100.dp),
rowCount = 5,
textStyle = MaterialTheme.typography.titleSmall,
textColor = Color(0xFFffc300),
selectorProperties = WheelPickerDefaults.selectorProperties(
enabled = true,
shape = RoundedCornerShape(0.dp),
color = Color(0xFFf1faee).copy(alpha = 0.2f),
border = BorderStroke(2.dp, Color(0xFFf1faee))
)
){ snappedDateTime -> }
```
## Setup
1. Open the file `settings.gradle` (it looks like that)
```groovy
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
// add jitpack here 👇🏽
maven { url 'https://jitpack.io' }
...
}
}
...
```
2. Sync the project
3. Add dependency
```groovy
dependencies {
implementation 'com.github.commandiron:WheelPickerCompose:1.1.11'
}
```
4. < API 26 (optional)
```groovy
compileOptions {
coreLibraryDesugaringEnabled true
//
}
//
dependencies {
//
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.6"
}
```