Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

To those that want to support a number picker all the way back to Froyo at least, without using a third-party library or writing your own implementation, you can use the source code of the NumberPicker written by Romain Guy used in the AOSP Messaging app on Github. View my answer on this post for a link to the code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top