Sure. Call finish() on the activity you need, after launching the new activity.

So in A you'd have:

void launchB()
{
startActivity(new Intent(this, ActivityB.class));
finish();
}

And in B:

void launchA()
{
startActivity(new Intent(this, ActivityA.class));
finish();
}

15.08.2010 18:04, dm1973 пишет:
Right now I have 2 activities (A+B) and what I would like is for only
1 of them ever to be on the stack (If A shows B, I want the back
button from B to go to the home screen not A). Is their a good way of
doing this with activities Or should I change my app to be a bunch of
views?



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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

Reply via email to