Android: Clear the back stack

前端 未结 30 2394
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 06:47

In Android I have some activities, let\'s say A, B, C.

In A, I use this code to open B:

Intent intent = new Intent(this, B.class);
startActivity(inte         


        
30条回答
  •  南旧
    南旧 (楼主)
    2020-11-22 07:40

    The given code works correctly. I have tried in the Application Life Cycle sample.

    I haven't got B and C in the back stack after starting activity A with flag, FLAG_ACTIVITY_CLEAR_TOP

提交回复
热议问题