In Android, you can use “android.widget.Spinner” class to render a dropdown box selection list.
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.
Download it – Android-Spinner-DropDownList-Example.zip
0 comments:
Post a Comment