android - I cant find a difinitive way to save the state of a spinner in onSaveInstanceState, and recall it . . . please help -


i cant find difinitive way save state of spinner in onsaveinstancestate, , recall . . . please help.

i have spent hours looking , cannot find this. . . . want temporarily. not want use sharedpreferences.

for spinner think use arraylist have save arraylist

@override     protected void onsaveinstancestate(bundle outstate) {          outstate.putstringarraylist("arruserids", arruserids);           super.onsaveinstancestate(outstate);     } 

and can restore arraylist onrestoreinstancestate method

@override     protected void onrestoreinstancestate(bundle savedinstancestate) {          arruserids = savedinstancestate.getstringarraylist("arruserids");          super.onrestoreinstancestate(savedinstancestate);     } 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -