Are you saving it in onSaveInstanceState and restoring it in onRestoreInstanceState?

If not... it's "As designed" :).



On 27/05/2010 8:54 AM, vistaman wrote:
I am seeing a rare exception: Let's say my main activity has a list of
data, called List<string>  dataList. I initialize it in the onCreate
method of the Activity, so it should never be null during the lifetime
of an activity.

Yet, sometimes (very rare) after a sub-activity has finished and the
main activity's onActivityResult() is called, dataList becomes null.
It is as if while the sub-activity is running or finished running, the
main activity was recreated but onCreate was not called.

What else would have caused a main activity's state to become invalid,
while a sub-activity is being executed?


--
Sincerely,

Brad Gies
-----------------------------------------------------------------------
Bistro Bot - Bistro Blurb
http://www.bgies.com
http://www.bistroblurb.com
http://www.bistrobot.com
-----------------------------------------------------------------------

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to