views:

129

answers:

2

I have activity A that starts activity B which starts activity C

A -> B -> C

When a user clicks on a button in activity C, i want to bring A to the top of the stack and take B & C completely out of the stack. Is there a way to do this ? ?

+2  A: 

What I do is placing a finish() into onActivityResult of activity B depending if the button in C is clicked or not.

I don't know if that's the best way to achieve that, but seem correct for my use.

http://developerlife.com/tutorials/?p=302

Profete162
+3  A: 

You can use the FLAG_ACTIVITY_CLEAR_TOP flag on the intent to restart activity A.

Mayra
this worked, thanks
slim