11

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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
slim
  • 4,010
  • 9
  • 35
  • 42

1 Answers1

18

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

Cheryl Simon
  • 46,552
  • 15
  • 93
  • 82