Is it possible to return a spinner selected value only when I click in a button in the same activity, instead of using the OnItemSelected() method?
Yes. You have several options to get the value. Some of these are:
spinner.getSelectedItem()
spinner.getSelectedItemId()
spinner.getSelectedItemPosition()
Just take a look at this link to see all the different methods you can call on your spinner.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With