How to get Spinner selected item value to string?
Try this:
String text = mySpinner.getSelectedItem().toString();
Like this you can get value for different Spinners.
String Text = mySpinner.getSelectedItem().toString();
OR
mySpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
Object item = parent.getItemAtPosition(position);
}
public void onNothingSelected(AdapterView<?> parent) {
}
});