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

--~--~---------~--~----~------------~-------~--~----~
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