Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 360
Harinder Avatar asked Apr 26 '11 08:04

Harinder


1 Answers

Spinner spinner = (Spinner)findViewById(R.id.spinner); String text = spinner.getSelectedItem().toString(); 
like image 66
Farhan Avatar answered Oct 10 '22 08:10

Farhan