Intent intent = new Intent(); 
intent.putExtra("exit", "exit");//添加参数,这是退出的依据
intent.setClass(MenuActivity.this, loginActivity.class);//跳转到login界面,根据参数退出
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); //注意本行的FLAG设置,clear所有Activity记录
startActivity(intent);//注意啊,在跳转的页面中进行检测和退出

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
  • 2021-12-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
  • 2022-12-23
  • 2021-10-09
  • 2021-09-25
  • 2022-12-23
相关资源
相似解决方案