在Android 9.0的机器上测试了一下,如果Activity B的启动模式为singleTask,B在任务栈中已经存在,A启动B,

1. 使用startActivity方法,这时B调用的方法为onNewIntent->onRestart->onStart->onResume

2. 使用startActivityForResult方法,这时B的启动模式就退化为standard模式,这是B调用的方法为onCreate->onStart->onResume

 

相关文章:

  • 2021-11-04
  • 2022-12-23
  • 2021-09-17
  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2021-09-03
猜你喜欢
  • 2021-08-20
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
相关资源
相似解决方案