spinner get selected index
spinner1.getSelectedItemPosition();
spinner get selected index
spinner1.getSelectedItemPosition();
how to collect the selected value from spinner
fields.getSelectedItem().toString()
//A one liner is all that is needed
//Change 'fields' to the variable name of the spinner you are dealing with.
get selected item spinner
Spinner spinner = (Spinner)findViewById(R.id.spinner);
String text = spinner.getSelectedItem().toString();
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us