https://kotlinlang.org logo
Title
c

Colton Idle

01/21/2022, 3:20 PM
I need to create something like this in compose (essentially recreate ios' time picker). I looked already to see if anyone had one of these for compose with no luck. Anyone happen to know if something like this exists?
s

ste

01/21/2022, 4:11 PM
I implemented something similar few months ago (link). The code is bad but it might be a good start point
c

Chris Sinco [G]

01/21/2022, 6:46 PM
Just curious - are you recreating that because that is the desired design for both iOS/Android versus using the platform time picker?
2
k

K Merle

01/21/2022, 7:28 PM
Hopefully you've mentioned your teammates that this is iOS specific design and that on android it looks different. 🙂
c

Colton Idle

01/21/2022, 9:58 PM
@Chris Sinco [G] its what the design team wants. I've fought long enough with them that its "unusual" on android but they point to other apps that do it, and say that the android time picker is hard. Couple that with the fact that we're using a custom date picker (like crane sample app) and you have the perfect mix for "can you just do what ios does"
😤 2
f

Francesc

01/22/2022, 12:45 AM
been there too many times. Second class citizens we are.
1
c

Colton Idle

01/22/2022, 7:18 AM
Yeah. If selecting time wasn't such a big piece of our app then I think I would fight more. But I definitely have seen designs where they want to introduce some more uniqueness (like buttons that'll auto pick some pre-set convenient time (think like movie theater time selection sort of thing) But anyway. I'll keep fighting the good fight :android:

https://c.tenor.com/zJvexdmTjA4AAAAC/im-doing-my-part-serious.gif

f

Francesc

01/22/2022, 8:08 AM
I'm all for uniqueness, but straight copying an iOS control is not that.
But anyway, this is is achievable with a custom layout and then you use one for each section of the control
k

K Merle

01/22/2022, 8:55 AM
Been in same position in the past where I was requested to do as "iOS" does.