android开发中的小知识(持续更新中)

1.当一个Activity启动另一个时,它们的生命周期回调有部分是重合的,回调的时序搞错也可能引发一些问题。

  Activity A starts Activity B:

  1. Activity A's onPause() method executes.
  2. Then, Activity B's onCreate()onStart(), and onResume() methods execute in sequence. (Activity B now has user focus.)
  3. Then, if Activity A is no longer visible on screen, its onStop() method executes.

猜你喜欢

转载自www.cnblogs.com/npsngsxx/p/9178677.html
今日推荐