Android dialog number picker

25,994

Solution 1

After some deep testing and using, this is a list of usable Picker widget libraries

When kindly omitted the solution in accepted answer, these widget libraries are very usable if you need alter the design, and you like the way iOS does the wheel slider picker.

Solution 2

I think this one is better:

https://github.com/SimonVT/android-numberpicker

it has the same look of android 4.2 number picker:

enter image description here

another alternative is using the HoloEverywhere library, which has plenty of native look&feel of android jelly bean

Share:
25,994
Marek Sebera
Author by

Marek Sebera

Updated on July 09, 2022

Comments

  • Marek Sebera
    Marek Sebera almost 2 years

    Is there any tested and usable component we can use to show "Count selector" like this?
    Our target is to get it working from API v7 .

    enter image description here

    (Taken from DatePickerDialog)

  • android developer
    android developer almost 11 years
    it works fine. and looks holo-like. the way it works is a bit buggy on old android versions, as you can actually select the number and even type in the keyboard. i've updated now my answer to have a screenshot.
  • Ilya Gazman
    Ilya Gazman almost 11 years
    Sorry I tested it ,and it just bad written and bad looks, any of the projects mentioned in Marek Sebera answer is so much better especially Android Wheel who also have a great documentation.
  • android developer
    android developer almost 11 years
    ok, but it does look very similar to what android has. it's not far from how the native android wheel looks like. in fact, all of the links that are available here are not native at all. see, this is how android pickers look like: developer.android.com/design/building-blocks/pickers.html
  • Ilya Gazman
    Ilya Gazman almost 11 years
    There are many cases when using the native android is a bad choice. This is one of them. Android Wheel is much better suited then the native android wheel.
  • android developer
    android developer almost 11 years
    how come? what can it do that others can't? if it's about how it looks, that's a matter of taste.
  • Ilya Gazman
    Ilya Gazman almost 11 years
    I think that all of them including the native doesn't limit you in things that you can do. You can do anything. It's just be more hard and less clear with the native one as it is bad written.
  • android developer
    android developer almost 11 years
    well technically any open source project doesn't limit you in any way. but since i didn't read the code and didn't really test the library, i can't tell you anything. i can only say that in my opinion, a native look has a much better look than the rest that were offered here.
  • Ilya Gazman
    Ilya Gazman almost 11 years
    I hope you are a better developer then diplomat. I agree with your previous statement "that's a matter of taste". And as some one who tested both native and those open sources solutions, I can tell you that "Android Wheel" is the best of them. He offers you full documentation along with prebuild utilities and great sample. And the touch detection is working on entire screen unlike native that is bound to the wheel area only, the touch is better in "Android Wheel" and many other things too.
  • android developer
    android developer almost 11 years
    again, if it fits your needs, use it. just remember that the less native and less good looks it has, the less chance it has to get features.
  • Ilya Gazman
    Ilya Gazman almost 11 years
    There is a great saying in Hebrew: "על טעם והריח אין מה להתווכח" meaning: Taste is not a subject for argument. About getting featured in android, show me where did you read that? Google giving us the framework, but they not always giving us the best code. See Android Wheel as a sample for that.
  • Marek Sebera
    Marek Sebera almost 11 years
    Thanks guys, I however think this widget should be highlighted, so I added it to my accepted answer.
  • android developer
    android developer almost 11 years
    @Babibu yes i know of this saying (i know hebrew) . as i've written, use it if you want to use the native look and feel.
  • android developer
    android developer almost 11 years
    another alternative is holoeverywhere. you can try out their sample here: play.google.com/store/apps/details?id=org.holoeverywhere.dem‌​o