Android关闭activity之前的所有activity,重启actibity

直接关闭一个activity之前的所有Activity页面

解决方法:清理activity堆栈

Intent inent = new Intent(this, cls);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);

相关文章:

  • 2022-02-04
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-05-15
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-10
  • 2021-07-15
  • 2021-12-13
  • 2022-01-23
  • 2021-06-11
  • 2021-04-27
相关资源
相似解决方案