thanks for the quick answer. but is there any other solutions? i mean do not change the code of activity a and b, just clear the task stack.
在 2010-1-6 下午7:55,"jwei512" <jwei...@gmail.com>编写: Are you looking for a practical answer? Or was this more of a "theoretical" thought experiment type of question? If you want the practical answer, then I guess the simple thing to do would be to kill Activity A in it's onActivityResult method (which should be overridden since you are calling startActivityForResult on Activity B). In other words, before B kills itself, do something like setResult(RESULT_OK) and then kill B. Once this happens, it will return to Activity A's onActivityResult method, and in there you can have something like if(resultCode == RESULT_OK) { finish(); } And so at this point, Activity C is what your user should see, and Activity A/B have been killed off, and so once you kill Activity C your Activity stack is cleared and you're good to go. Hope this is what you were looking for. - jwei http://thinkandroid.wordpress.com On Jan 6, 1:12 am, Zhihong GUO <gzhh...@gmail.com> wrote: > Hi all, > > I have three activities. Ac... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en