J
J
jekmurod2014-04-13 04:46:25
Programming
jekmurod, 2014-04-13 04:46:25

android programming spinner swap

you need to make it so that when you click on a certain button (an application of the translator type, and a button with arrows) one of the selected elements of the spinner itam changes to another, well, they change places, so how can this be implemented?
Here is the code but it doesn't work!

int spinner1Index = spinner.getSelectedItemPosition();
        spinner.setSelection(spinner2.getSelectedItemPosition());
        
        spinner2.setSelection(spinnerfirst);

can you suggest something similar or fix it!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question