Android spinner example using ArrayAdapter and XML resource
Android spinner is very much like the HTML<select> tag. It basically displays dropdown list and you can select one from the list. There is no multi select available at this time. In this tutorial we will go thru the following ... Create a spinner from XML resource array Create a spinner dynamically using String Array and ArrayAdapter Ability to capture spinner selection on change using OnItemSelectedListener To create a spinner from XML resource we need to define an array in the strings.xml <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">Android Spinner Example</string> <string name="country_prompt">Choose a Nordic Country</string> <string-array name="country_array"> <item>Denmark</item> <item>Faroe Islands</item> <item>Finland</item> <item...