Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use NumberPicker in Android app with API 7?

The minimum sdk of my app is 7, but I can use DialogFragment which is from sdk version 11, because it is in the support library which is in my lib directory.

I'd like to make something like this example: http://developer.android.com/guide/topics/ui/controls/pickers.html

But I want to use the NumberPicker widget, which is from sdk version 11 too, but my app does not allow this. Do I have to add other support library?

How can I use this component?

Thank you.

like image 250
androidevil Avatar asked Nov 21 '12 13:11

androidevil


1 Answers

Do I have to add other support library?

The Android Support library does not offer NumberPicker. Other people have created their own backports of NumberPicker that you could use, such as SimonVT's one.

like image 125
CommonsWare Avatar answered Nov 03 '22 04:11

CommonsWare