Intent i=new Intent(this,Activity1.class);  
 i.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);  
 startActivity(i);  



用这种方式调用Activity,如果Activity在堆栈中,将会运行它的onStart, onResume函数,而不会运行onCreate函数。这样,Activity最后运行的状态就能够保存。

相关文章:

  • 2021-07-18
  • 2022-03-03
  • 2021-07-07
  • 2022-02-12
  • 2021-11-05
  • 2021-07-21
猜你喜欢
  • 2021-11-26
  • 2021-12-08
  • 2021-06-08
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
  • 2021-08-19
相关资源
相似解决方案