Dianne, Are there specific things I should check in "adb shell dumpsys activity" for this problem?
Thanks, David On 4月3日, 上午11时26分, Dianne Hackborn <[email protected]> wrote: > You might want to post some code. > > Also, "adb shell dumpsys activity" lets you see the system's current > activity stack (the first part of the dump). > > On Thu, Apr 2, 2009 at 5:51 PM, [email protected] < > > > > [email protected]> wrote: > > > My application has 2 activities. The main activity will create the > > "child" activity through startActivityForResult((...). When the child > > activity needs to exit, it calls setResult(..) and finish(). Child > > activity will start and exit multiple time upon user selection. The > > activity are start and exit as expected and onAcitivtyResult(..) also > > got invoked. > > > However, I found a problem with child activity, when the child > > activity was created the second time ( Main activity called > > startActivityForResult(...) upon some user event ), a new instance of > > child activity was created, but the displayed is the FIRST instance > > child activity!!! ( so any state in second instance of child activity > > was not accessible ). The onKey(...) was always go to first instance > > of child activity. Make things more interesting, the getInstanceCount > > () returns 3. > > > I have checked the code and no where holds the first instance of child > > activity which should be garbage collected after finish(). Can someone > > help out why this happens and how to fix? > > > Thanks, > > David > > -- > 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 -~----------~----~----~----~------~----~------~--~---

