How to get a selected Item from a spinner in ANDROID?

By | February 28, 2011

We have come across this issue many times during programming to get a selected item in your combobox.
ANDROID has built in functions to get the selected item from a spinner.
Take a look at the snippet.
Here my_spinner id the spinner variable and using getSelectedItem() which will return an object and by using toString() I am converting it to human readable string…

my_spinner.getSelectedItem().toString();

Please leave your valuable comments…..

4 thoughts on “How to get a selected Item from a spinner in ANDROID?

  1. Pingback: Customizing a spinner in android.

  2. Pingback: Custom Spinner in Android Redone using BaseAdapter..

Leave a Reply

Your email address will not be published. Required fields are marked *