Whenever we want to select a values out of available values spinner is one of the available option.

Spinner consists of a list of values where user have to select a value.Spinner’s are generally used is form’s, selecting color, size, font and many other requirements.

In this tutorial we will see a spinner consists of android version’s and can select one out of it.

MainActivity.java

 

 

Adding Spinner to our xml file.

 

activity_main.xml

strings.xml

add spinner in strings.xml file

AndroidManifest.xml

 

Output :

spinner1

 

spinner2

Any queries in this tutorial add comments below.

Show Buttons
Hide Buttons
Read previous post:
Android Tutorial on Radio-Button

Close