Activity.finishAffinity() vs Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK

前端 未结 4 536
伪装坚强ぢ
伪装坚强ぢ 2021-01-01 11:09

In Android, if you want to clear your current Activity stack and launch a new Activity (for example, logging out of the app and launching a log in

4条回答
  •  清酒与你
    2021-01-01 11:42

    Try this

    Intent.FLAG_ACTIVITY_CLEAR_TOP
    

    it clears the stack of previous activities

提交回复
热议问题