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

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -