Anyone know if there’s a decent equivalent of Numb...
# compose
m
Anyone know if there’s a decent equivalent of NumberPicker for compose? The normal android view is way out of date in terms of it’s support for theming, so using an AndroidView wouldn’t really help me. I don’t see any existing Composable that would implement this. I saw some gists on the web for one that scrolls through the numbers, but the non selected numbers are only visible while scrolling, and disappear when a number is actually selected. I’m looking for the style in the system NumberPicker (which also is used in DatePicker and TimePicker)
d
Do you mean like a vertical scrollable number selector?
m
Yeah. You can see them in the DatePicker control as well as NumberPicker
They’re basically using NumberPicker which takes a min/max value, and a list of strings for the labels that go with those values.
@Daniele Segato ^^^
d
Yes, was just making sure you meant what i was thinking. They shouldn't be too hard to create in Compose but I'm not aware of any existing library.
m
i haven’t figured out all the animation stuff quite yet. The example i see is creating a Box with 3 labels, and moving the offsets as you drag around. It works, but it only shows 3ish rows between the blue lines you see above. I really need something that will keep those rows visible, and keep the lines in place. I’ll do some work on what’s there to see if i can get it to do that, but i’m still figuring out all the animation and how their calculations are working.