就是 启动新的activity  但是把之前所有的activity 都finish掉

 

 

而且所有的activity 都是在一个栈中

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



intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_CLEAR_TASK);
便有次用处

相关文章:

  • 2022-03-02
  • 2021-12-15
  • 2022-01-10
  • 2021-09-10
  • 2021-05-11
  • 2021-08-15
  • 2021-09-11
猜你喜欢
  • 2022-12-23
  • 2021-07-06
  • 2022-12-23
  • 2021-07-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案