Get Selected Items Text in Spinner in Android
by Sasikumar[ Edit ] 2013-12-13 17:30:13
To get selected items text in spinner in android :
Get reference to the spinner as follows
my_spinner= (Spinner)findViewById(R.id.my_spinner);
Get value from the selected item with following code
my_spinner.getSelectedItem().toString();
"getSelectedItem()" function would return the selected object, we should use "toString()" function to get the text of the selected item.