Tutorial 18 - How to create Number picker

What you will learn in this Tutorial

How to create NUMBER_PICKER

Download Source Code - Tutorials
Reference NUMBER_PICKER control
Other pickers: CHECKBOX, DATETIMEPICKER, RADIOGROUP, SINGLE_CHOICE_DIALOG, SINGLE_CHOICE_PICKER

Introduction

NUMBER_PICKER control allows a user to select a number between minimum and maximum number. For example, if a user is buying something, the quantity can be specified by selecting a number between 1 and 100.

Android iOS
../_images/number_picker1.png coming soon

How to create NUMBER_PICKER

In the tutorial single-sel-ctrl, see numberpicker.xml

The code below allows the user to select a number between 1 and 100.

<control type="NUMBER_PICKER" x="35" y="23" width="40" height="8" appearance_name="edit_box" data_type="INT"
            field_name="quantity" min="1" max="100" default_value="2"/>

Run the single-sel-ctrl tutorial.

Android - Right click on the project and click on Run as Android application.

iOS - In the scheme, select ..single-selection-controls and Click on Product -> Run.

Enter the quantity.