Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android dialog number picker

Tags:

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)

like image 560
Marek Sebera Avatar asked Oct 03 '11 09:10

Marek Sebera


People also ask

What is android picker?

Android provides controls for the user to pick a time or pick a date as ready-to-use dialogs. Each picker provides controls for selecting each part of the time (hour, minute, AM/PM) or date (month, day, year).

What is number picker in Android Studio?

↳ android.widget.NumberPicker. A widget that enables the user to select a number from a predefined range. There are two flavors of this widget and which one is presented to the user depends on the current theme.

How do you make a number picker horizontal?

In fact, you can. Add android:orientation="horizontal" in the XML and it is horizontal.


2 Answers

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

  • Android Wheel http://code.google.com/p/android-wheel/
  • Number Picker from Michael Novak https://github.com/mrn/numberpicker
  • Date Slider (which can be easily adjusted) http://code.google.com/p/android-dateslider/
  • Horizontal slider widget http://blog.sephiroth.it/2012/01/28/android-wheel-widget/
  • Backport of Android 4.2 NumberPicker https://github.com/SimonVT/android-numberpicker

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.

like image 91
Marek Sebera Avatar answered Oct 23 '22 18:10

Marek Sebera


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

like image 21
android developer Avatar answered Oct 23 '22 19:10

android developer