- Get link
- X
- Other Apps
Here we are going to see how to use NumberPicker. NumberPicker is a widget that enables the user to select a number from a predefined range. We can see the NumberPicker in Old Style of TimePicker How it works - You can select the values on scroll up or down You can also edit the value that on view Lets see an Example to implement (E.g. for Select the date) Create and XML <LinearLayout android:id="@+id/id_picker_ll" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:weightSum="3"> <NumberPicker android:id="@+id/year_pick" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginRight="1dp" android:layout_weight="1"/> <NumberPicker