Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Example source of an Android number picker widget
branch: master

This branch is 11 commits ahead of chiirz:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
res fixed pathing issue with the layout files

Number Picker Sample

This project contains a working example of a number picker widget for use in Android applications. In addition to the basic widget included in this project is a sample preference dialog that contains the number picker widget. All source code is licensed under the Apache 2.0 License. If you come across issues with the provided code you can file an issue on the Github project page.

Few notes on resources

  • The number picker preference uses a few attributes defined in the res/values/attrs.xml file.

  • In the number picker preference Java class it references the namespace defined in the attrs.xml file.

  • You'll notice in the res/xml/preferences.xml file in the top level element there's a namespace defined to allow easy use of properties to set max range and min range as well as the default value.


2011-10-24 Paul Bourke

  • Updated library project to support the new SDK r14 tools.

2011-08-27 Xenofon Papadopoulos

  • Added setWrap() method

  • Initialization will respect user-provided attributes in the layout, see the example in res/layout/main.xml

Something went wrong with that request. Please try again.