Save spinner state

Asked

Viewed 475 times

0

I would like to know how to, after selecting an option of the spinner, save it at the time of the form for change, example: I choose option 2, when it is time to change the form, the selected option of the spinner will be option 2, not option 1

  • Use posicao = spinner.getSelectedItemPosition() To get the position of the selected item, store it in the same way as the other form data. When changing the selection on Spinner through spinner.setSelection(posicao);

  • but I will need after that, save position in the database?

  • Yes, you should keep it in the database along with the other form data.

  • The data that fill the Spinner are also database?

  • saved me, just like that, I finished my TCC!

  • as I finish by saying that you help me and help in the reputation?

  • There’s no need to do anything, it’s enough for me to know that I’ve been able to help.

  • I’m also studying this, please @ramaral, don’t need to use spinner ID? how to differentiate from other spinners on the same page?

  • You must have a field in the table for each spinner.

Show 4 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.