Reputation: 49
I need some kind of NumberPicker for an App i'm developing, the Problem is: I have the requirement of Api Level 10, and from what the reference says Number Picker was first introduced in 11...
I looked at Date and Time Picker, but both use Numberpickers....
I really am quite new to Android and have no Idea how to create custom widgets, so by looking at the source i don't understand a lot of what is goind on beyond the surface and how those Layouts and Widgets depend on each other.
For now our App uses Spinners, but this is an university project and our professor said he doesn't really like them and would like us to use something similar to a number/date/timepicker...
My Requirements: First part of my picked "number" is a letter (or more than one, up to a short word) after that two two digit numbers whose range needs to adjust depending on the picked letter.
Any ideas how i could do that better/prettier than by using three spinners and adjusting their arrays (if that is even possible)?
Upvotes: 0
Views: 4410
Reputation: 530
There is a question here on SO describing the same problem for API level 7 (see: How to use NumberPicker in Android app with API 7?). Unfortunately, the situation seems to be the same for api level 10: NumberPicker
is not part of the android support library, so you have to look out for backports like this:
https://github.com/SimonVT/android-numberpicker
or write your own implementation.
Upvotes: 1