How would you save and retrieve a spinners selection, so when you come back the same item on the spinner is selected? Maybe with shared preferences?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
to Save data on the
sharedPreferences( put this code on theonItemSelected()method and save the selected value’s position of yourspinner) :To get data from
sharedPreferences:refer this : set selection in spinner
and this : get the position of the selected item in a spinner
See Also :
Android Tutorial : Using SharedPreferences
Android Tutorial : Switch Between Activities and Pass Data Between Them