Public static variables and Android activity life cycle management

后端 未结 3 1384
無奈伤痛
無奈伤痛 2020-12-03 02:48

According to the documentation the Android OS can kill the activity at the rear of the backstack.

So, say for example I have an app and open the Main Activity (let\

3条回答
  •  暖寄归人
    2020-12-03 03:42

    If the process is killed then all static variables will be reinitialized to their default values.

    So whatever value you have set in Activity A will not persist

提交回复
热议问题