A numberpicker widget for android
Java
Latest commit 5d39c62 Sep 17, 2011 @rp- add a second 2 style which will be default
numbers are now drawn on top

README.rst

NumberPicker

This is a numberpicker widget for android. In ascii it looks something like this:

++++
0012
----

Requirements

Following requirements are needed:

  • android 1.6 (API4) >=

Installation

Copy the drawables and also the com.oldsch00l.NumberPicker.java folder into your project. Except the com.oldsch00l.NumberPickerActivity.java, which is only the sample activity.

Usage

You can simply use the numberpicker widget in you layout xml file:

<com.oldsch00l.NumberPicker xmlns:np="http://oldsch00l.com/android/numberpicker"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    np:digits="4"
/>

Parameters

digits
Number of digits to show.
size
Size of a cell (+ button, - button, number)
textSize
Could be the size of the text
value
Initial value to show and edit
repeatDelay
The delay between increase or decrease if you hold the button