Activity is getting destroyed while pressing the home button

前端 未结 6 812
感动是毒
感动是毒 2020-12-19 03:50

In my application, when I press the home button the activity is going to onDestroy(). It suppose to be called onPause() method only right?

6条回答
  •  太阳男子
    2020-12-19 03:58

    It depends on how much memory your phone has, if your phone does not have very much memory, then it will destroy the activity to free up resources immediately. On new phones, this will not happen because they have plenty of spare memory.

提交回复
热议问题