android - savedInstanceState is always null -


this savedinstacestate code:

@override public void onsaveinstancestate(bundle savedinstancestate)  {     savedinstancestate.putstringarraylist("todo_arraylist", altodo);     log.v("bundle", "saved");     super.onsaveinstancestate(savedinstancestate); }   public void oncreate(bundle savedinstancestate)  {     super.oncreate(savedinstancestate);      if (savedinstancestate != null)      {         altodo = savedinstancestate.getstringarraylist("todo_arraylist");         log.v("bundle", "restored");     }     else     {         log.v("bundle", "null");     }      setcontentview(r.layout.main); } 

the logs show "bundle save" tag.

but in oncreate method, savedinstancestate null.

did check if have id set view ( if view is/has...). onsaveinstancestate() not called otherwise.

check link.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -