You probably have the two activities in two different tasks, so pressing the icon again brings the first one to the front and leave sthe second running. You can look at "adb shell dumpsys activity" to see what the stacks look like. Make sure you aren't using NEW_TASK, singleInstance, or singleTask.
On Fri, Sep 4, 2009 at 2:56 PM, sdphil <[email protected]> wrote: > > after reading about the android lifecycle, i put some logging in my > current code -- > > I get -- > > Activity1.onCreate(null) > Activity1.onStart() > Activity1.onResume() > -- initiate gui action which causes startActivity(intent) > Activity2.onCreate(null) > Activity2.onStart() > Activity2.onResume() > Activity1.onStop() > -- press the home button > Activity2.onPause() > Activity2.onStop() > -- press the icon again > Activity1.onCreate(null) > Activity1.onStart() > Activity1.onResume() > > My question is after i hit the home button, it looks like it didn't > call Activity1.onDestroy() -- fine, no problem. But when I hit the > application icon again, it still didn't call it, which makes me think > there are two "tasks" running which have Activity1 as the root > activity. Or am I missing something... > > tia. > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

