Android Spinner – UI Widget


Spinner is a Android Widget which is used to select one value among lot of values given in array.It is very simple to work with. lets code –

Download Code

First of all you have to take spinner widget in activity_main.xml ,

Now in you have to define a String type Array and adapter and set adapter to spinner .

Make sure your file should implement AdapterView.OnItemSelectedListener . I take version Array of String type and Adapter aa .

Output –

spinner output spinner_output

For more queries and tutorials do post here and comment . Happy coding :p