Life cycle of Android Activity after pressing Back button

前端 未结 7 800
春和景丽
春和景丽 2020-12-07 19:17

I am little confused between the life cycle of two activities.

Suppose I have Activity A and Activity B.

B is called From A i.e A ----> B.

相关标签:
7条回答
  • 2020-12-07 20:07

    The following activity call back methods are called, after pressing back button.

    onPause()
    onStop()
    onDestroy()
    

    The activity is destroyed.

    And it recreates when launched again. These are the callback methods when it launches again.

    onCreate()
    onStart()
    onResume()
    
    0 讨论(0)
提交回复
热议问题