There's a NumberPicker widget in API 11, but I'm building for a minimum API of 7. How would I go about implementing one? Is there a custom widget that I can use, or is there a way to get at the components that make up DatePicker / TimePicker?
I find this one very good and flexible given that there were few ready made options available at that api level at the beginning of 2012 when this question was asked.
http://code.google.com/p/android-wheel/
EDIT: So what if IOS has a similar looking control. That does not make this answer bad. Android is about freedom of choice. Besides, the look of this control is dependent on styles. Take away the shadow, add blue highlights and it looks identical to the Android 4 time picker which is what the OP was asking for.
I am pointing to a possible solution to a persons problem. I am NOT advocating that Android apps should look like IOS apps and I personally hate Android apps that are badly ported so they are a clone of their IOS versions. Some people really are fanboys.
copy the NumberPicker's code in API11 to your project.
xuyao's post doesn't work. The NumberPicker has API11-dependencies (android.animator.*) which cannot be easily replaced. You have to take one of the given libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With