
Features a collection of easy-to-use wheel pickers, including text, number, and time pickers, enhancing user interface components with customizable options and visual selections.
Compose Multiplatform library that features a collection of easy to implement wheel pickers.
Current pickers:
If you're using a version catalog then add the following to your libs.versions.toml file:
[versions]
#...
multipickers = "1.0.1"
[libraries]
#...
multipickers = { module = "io.github.user154lt:multipickers", version.ref = "multipickers" }Then add the following to your module level build.gradle.kts dependencies block
dependencies {
implementation(libs.multipickers)
} Alternatively you can add the following to your module level build.gradle.kts dependencies block
dependencies {
implementation("io.github.user154lt:multipickers:1.0.1")
}|
Short Picker |
Long Picker |
|
Time Picker |
Picker with colorful selection |
@Composable
fun TextPicker() {
val textList = listOf("One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten")
val pickerState = rememberSaveablePickerState(
itemsCount = textList.size
)
TextPicker(items = textList, pickerState = pickerState)
}
@Composable
fun NumberPicker() {
val numberList = (0..100).toList()
val pickerState = rememberSaveablePickerState(
itemsCount = numberList.size,
pickerLength = PickerLength.Long
)
TimePicker(pickerState = pickerState)
}
@Composable
fun TimePickerPreview() {
val pickerState = rememberTimePickerState(
initialHour = 12,
initialMinute = 30,
initialSecond = 0,
pickerLength = PickerLength.LONG
)
NumberPicker(items = numberList, pickerState = pickerState)
}
Copyright 2024 ReturDev
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Compose Multiplatform library that features a collection of easy to implement wheel pickers.
Current pickers:
If you're using a version catalog then add the following to your libs.versions.toml file:
[versions]
#...
multipickers = "1.0.1"
[libraries]
#...
multipickers = { module = "io.github.user154lt:multipickers", version.ref = "multipickers" }Then add the following to your module level build.gradle.kts dependencies block
dependencies {
implementation(libs.multipickers)
} Alternatively you can add the following to your module level build.gradle.kts dependencies block
dependencies {
implementation("io.github.user154lt:multipickers:1.0.1")
}|
Short Picker |
Long Picker |
|
Time Picker |
Picker with colorful selection |
@Composable
fun TextPicker() {
val textList = listOf("One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten")
val pickerState = rememberSaveablePickerState(
itemsCount = textList.size
)
TextPicker(items = textList, pickerState = pickerState)
}
@Composable
fun NumberPicker() {
val numberList = (0..100).toList()
val pickerState = rememberSaveablePickerState(
itemsCount = numberList.size,
pickerLength = PickerLength.Long
)
TimePicker(pickerState = pickerState)
}
@Composable
fun TimePickerPreview() {
val pickerState = rememberTimePickerState(
initialHour = 12,
initialMinute = 30,
initialSecond = 0,
pickerLength = PickerLength.LONG
)
NumberPicker(items = numberList, pickerState = pickerState)
}
Copyright 2024 ReturDev
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.