Re: [android-developers] Re: Keeping an activity alive

2011-11-09 Thread Mark Murphy
On Wed, Nov 9, 2011 at 5:32 AM, RLScott wrote: > The app may be put into background when you press the home button, but > the activity itself is always destroyed. No. An activity is immediately destroyed for a BACK press, or a finish() call, but not HOME. > So onCreate will be called > every tim

[android-developers] Re: Keeping an activity alive

2011-11-09 Thread RLScott
The app may be put into background when you press the home button, but the activity itself is always destroyed. So onCreate will be called every time it becomes visible. If you want to preserve some content in your app, then don't store that content as part of the activity class. Store it in a g

[android-developers] Re: Keeping an Activity alive instead of destroying it?

2009-11-23 Thread Mark Wyszomierski
I definitely agree with just working on making the UI faster to load - I rewrote the activity so the UI loads in a staggered manner. It's a ScrollView with several irregularly shaped sub views (which don't fit nicely in a ListView). Therefore I am adding each subview one at a time to the ScrollView

Re: [android-developers] Re: Keeping an Activity alive instead of destroying it?

2009-11-23 Thread Mark Murphy
Mark Wyszomierski wrote: > It's only causing a slight annoyance to the user. Although the UI > takes about 1.5 seconds to completely build, I am doing a staggered > load. This lets the user see content immediately, but they're > wondering why every time they leave the search activity, then come > b

Re: [android-developers] Re: Keeping an Activity alive instead of destroying it?

2009-11-23 Thread Dianne Hackborn
What are you doing that is making it so heavy to build the UI? 1.5 second just to get the basic activity UI up is pretty long, for example. You would probably be best off first looking at optimizing this work (such as by simplifying view hierarchies etc). On Mon, Nov 23, 2009 at 10:03 AM, Mark W

[android-developers] Re: Keeping an Activity alive instead of destroying it?

2009-11-23 Thread Mark Wyszomierski
Hi Mark, It's only causing a slight annoyance to the user. Although the UI takes about 1.5 seconds to completely build, I am doing a staggered load. This lets the user see content immediately, but they're wondering why every time they leave the search activity, then come back, all the content must