Get spinner selected items text?

Harinder picture Harinder · Apr 26, 2011 · Viewed 405.5k times · Source

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.

Answer

Farhan picture Farhan · Apr 26, 2011
Spinner spinner = (Spinner)findViewById(R.id.spinner);
String text = spinner.getSelectedItem().toString();