📜  清除回栈 android - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:23.859000             🧑  作者: Mango

代码示例2
Intent intent = new Intent(this, A.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); 
startActivity(intent);
CurrentActivity.this.finish(); // if the activity running has it's own context


// view.getContext().finish() for fragments etc.