Android remove Activity from back stack

后端 未结 11 2073
予麋鹿
予麋鹿 2020-12-07 17:23

Okay so I\'m kind of stumped on what to do with this. So I have the MainActivity, and from there an Activity can be launched to DegreePlanActivity, and from there another Ac

11条回答
  •  鱼传尺愫
    2020-12-07 18:04

    Intent intent = new Intent(getContext(), MainActivity.class);
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); 
    
    startActivity(intent);
    

提交回复
热议问题