In Android, you can use “android.widget.Spinner” class to render a dropdown box selection list.
Note
Spinner is a widget similar to a drop-down list for selecting items.
Spinner is a widget similar to a drop-down list for selecting items.
In this tutorial, we show you how to do the following tasks :
- Render a Spinner in XML, and load the selection items via XML file also.
- Render another Spinner in XML, and load the selection items via code dynamically.
- Attach a listener on Spinner, fire when user select a value in Spinner.
- Render and attach a listener on a normal button, fire when user click on it, and it will display selected value of Spinner.
Read full article from Android spinner (drop down list) example
No comments:
Post a Comment