Android中Activity的生命周期.docxVIP

  • 10
  • 0
  • 约2.81千字
  • 约 7页
  • 2021-04-13 发布于天津
  • 举报
页 页 页 页 说来惭愧,虽然已经做了一年多的 an droid开发,但是最近被 人问起activity 的生命周期的时候,却感觉自己并不能很自信 很确定的回答对方的问题,对 activity 的生命周期的理解还不 透彻啊。 既然发现了问题,那咱就得解决问题,不就个生命周期, 能有多复杂。 首先看看an droid developers 网上的activity 的生命周 期图: Activity hunched? onCrealQonStartQonRestart[)User naviigatesonAesumeQto th e activity一LApp process killed Activity hunched ? onCrealQ onStartQ onRestart[) User naviigates onAesumeQ to th e activity 一 L App process killed Activity running ■ 1 Another activ ty comes Into the foreground 1 1 Apps with higher priority need memory onrausey User returns to the activity The activity is no longer vis ble onStopf) U

文档评论(0)

1亿VIP精品文档

相关文档