okay, what I wound up doing was to create a base class that all my activities derive from. then I keep track of the activities in a static variable. when a derived activity class calls "finishAll()" it iterates through the activites it knows about and calls "finish()" on them (except if it equals "this").
Then the client calls "startActivity()" and then calls "finish()" On Sep 17, 12:25 pm, Dianne Hackborn <hack...@android.com> wrote: > You can't directly replace the root. The only way I can think off-hand to > do this is to use CLEAR_TOP when starting the same activity component as > your current root to send an intent down to that root (and finish all of the > activities in-between, and then handle onNewIntent() there to see this > intent and start the new desired activity and finish itself. > > > > On Thu, Sep 17, 2009 at 11:27 AM, sdphil <phil.pellouch...@gmail.com> wrote: > > > hi, i want to clear the activity stack and replace it with a new > > activity as the root activity, even if that activity exists somewhere > > on the stack (or not). > > > i see -- FLAG_ACTIVITY_CLEAR_TOP and FLAG_ACTIVITY_NEW_TASK, but > > it's not obvious to me how to use those in conjunction to achieve what > > I want. > > > it's like i want to completely restart the task with some activity > > that i specify as the new root. > > > tia. > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > 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 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 -~----------~----~----~----~------~----~------~--~---