finishActivity() is intended to be used to force-finish an activity,
*** from the same activity that started it ***.
So, if you want to force-finish Activity B, then I think Main Activity
is the only one that can do it via finishActivity(), because Main
Activity is the one that started it.

However, I think there's a way for Activity C to terminate and to go
back directly to Main Activity and to ask Main Activity to destroy all
activities "above" it (B).  Let me see if I can find that...

-- PJ


On Nov 5, 2:58 pm, Bob Cai <[email protected]> wrote:
> Hello,
>
> In main Activity, I called startActivityForResult(intentB, 100) to start a
> new activity B, then in B, I called startActivity(intentC) to start another
> activity C. Lastly I wanted to call finishActivity(100) in C to close
> activity B, but seemed it was not successfully destoried(I can use BACK key
> to see it's still there.).
>
> Anyone can give advice of this?
>
> Thanks,
> Bob

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