Get spinner selected items text?


How to get spinner selected item's text?

I have to get the text on the item selected in my spinner when i click on the save button. i need the text not the Index.


Answers:


Spinner spinner = (Spinner)findViewById(R.id.spinner);
String text = spinner.getSelectedItem().toString();