https://kotlinlang.org logo
#compose-wear
Title
# compose-wear
y

yschimke

05/20/2022, 7:50 AM
Another blatant Horologist commercial, this time thanks to @Steve Bower [G] and the Wear OS UX team - some high quality full screen date and time pickers. https://google.github.io/horologist/composables/
👍🏼 1
👍🏽 1
👍 4
Copy code
DatePicker(
    date = time.toLocalDate(),
    onDateConfirm = {
        time = time.toLocalTime().atDate(it)
        navController.popBackStack()
    }
)
All designed to follow your MaterialTheme
j

John Nichol

05/20/2022, 8:18 AM
FYI I have the sample with the step through written
👍 1
🙌🏽 1
👍🏼 1
🙏🏻 1
z

Zoltan Demant

05/21/2022, 6:57 AM
Any chance that we could get a generic version of this? Im looking into implementing a picker similar to the hour/min one in the video above; in my case you would instead pick from weights, repetitions, etc. Edit for details: For my particular use-case, Id like to be able to specify the title (hour/min) and all the values as strings, with a callback to the selected index similar to
onDateConfirm
above. I can always build this myself, but similar to how Im leaning on the compose-material library, Id love to do the same here if possible!
y

yschimke

05/21/2022, 7:53 AM
I believe @Sergio Sancho is working on this, but not sure when it will be available. Basically a PickerGroup, that does all the hard work of the 3 current pickers.
❤️ 1
3 Views