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 <[email protected]> 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
[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
-~----------~----~----~----~------~----~------~--~---

Reply via email to