I have a spinner with 3 options. The first option shows up with the method onCreate. When the first option is selected, in an EditText I write something, and click in a button to save it. Well, my question is if I can change the spinner to the next option when I press the button.
Asked
Active
Viewed 54 times
1 Answers
0
set an OnClickListener to your Button. In the onClick method set the selection of the spinner to the current selected value and add "1"
myButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(final View v) {
mySpinner.setSelection(mySpinner.getSelectedItemPosition()+1);
}

Philipp Schumann
- 1,790
- 2
- 12
- 12