so i Want to pass the selected item from the spinner to another activity and wanna use an if statement on the second activity. for example
if(spinnerPos selected item == "...") do that and that.
but i dont know what we get back from the Spinner (value or string).
Im programming with java on android studio.
My code is here: https://www.codepile.net/pile/K7AR9qeY
CodePudding user response:
You can get string object ,and perform validation like this.
if (spinnerPos.equals("0")){
// execute work
} else{
// do another
}