savedInstanceState null?

Put your problem here if it does not fit any of the other categories.

savedInstanceState null?

Postby chris24300 » Wed Jan 19, 2011 4:48 pm

Hi All,

I'm not familiar with saving my programs state so heres my question, how do you call onSaveInstaceState(bundle) properly?

From onPause() I call onSaveInstanceState(bundle) passing it a bundle I created.

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Bundle test = new Bundle();
  2. this.onSaveInstanceState(test);
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


Then in onCreate(bundle) I check if it's null and every time it is...

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. onCreate(Bundle savedInstanceState)
  2. {
  3.   ...
  4.   if (savedInstanceState != null)
  5.   {
  6.     ...
  7.    } else { ... }
  8.  
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


Can someone help me out here?

Thanks,
Chris
chris24300
Senior Developer
Senior Developer
 
Posts: 109
Joined: Wed Apr 28, 2010 3:13 pm

Top

Re: savedInstanceState null?

Postby chris24300 » Thu Jan 20, 2011 6:15 pm

Nobody has used this before??
chris24300
Senior Developer
Senior Developer
 
Posts: 109
Joined: Wed Apr 28, 2010 3:13 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 19 guests