'Alternative to NumberPicker for API 8 [duplicate]
Possible Duplicate:
How would one implement a NumberPicker in Android API 7?
I need to pick a small integer in the range 0 to 12. The space in my UI to do this is restricted and must be wider than it is tall. Is there a widget available in API 8 that will allow me to do this?
EDIT: Re possible duplication of previous SO question. I saw a closely related question, but A) it made no "landscape orientation" restriction and B) A suggestion that code could be copied from api 11 was not followed up with an explanation of exactly how to do it.
Solution 1:[1]
Try looking at this Custom Number Picker. I would start with that and simply modify the layout of the control to be horizontally oriented.
Another option is to find the source code for the Android 2.3.4 NumberPicker and NumberPickerButton and copy that. This will also require copying the resources required for those controls. Again, you would then need to modify the button layout to be horizontally oriented.
I would not recommend using the NumberPicker from API 11 or greater. You will find that there are numerous depenencies on newer classes that are not available to you with API 8.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | jsmith |
