I need to store selected spinner values and retrieve it back from db and display it in another spinner.
So How to store the values i.e using getselecteditem() ?
And also while retrieving, how to retrieve it back and display in spinner?
values.put("year", spinYear.getSelectedItemPosition()); //currently storing position
spinYear.setSelection(c.getInt(c.getColumnIndex("year")));//retrieving from sqlite .
Instead of that, I need to store selectedItem and display it in spinner.
Please help.
Aucun commentaire:
Enregistrer un commentaire