Use startActivity() with an Intent for activity B, and both
FLAG_ACTIVITY_CLEAR_TOP and FLAG_ACTIVITY_SINGLE_TOP as flags on the
Intent.

On Tue, Jul 5, 2011 at 5:00 AM, Ravi Sharma <[email protected]> wrote:
> Hi,
> I have Activities tree like this
> My Application Starts With Activity A(Login)
> Then from A user can go to Activity B
> Then from B User can go to C
> Then From C user can go to D or back to B
> Then From D user can go to E or back to C
>
> In Short (as in any mobile apps)
> A -> B <-> C <-> D <-> E
>
>
> Now i have requirment hten whene user choose some option(Cancel) in Menu at
> Activity E or D or C, user should got back to Activity B(not A as its Login)
> Now i call this.finish on the activity where cancel was pressed but it
> doesnt take me to Actvity B(unless i am already on C), it takes me to only
> one activity back.
>
> And starting new Intesnt for Activity B wont help as it will keep creating
> new activity and then when user will press back it will go back from B to
> E..which is wrong.
>
>
> Could you please suggest something
>
> Thanks
> Ravi.
>
> --
> 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



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.6 Available!

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