android - Cases when savedInstanceState is NOT null -
if not explicitly call onsaveinstancestate(), possibilities, when savedinstancestate not null in oncreate?
i see 1 option, when system recreates app after crash - savedinstancestate not null.
which other options?
which possibilities, when savedinstancestate not null in oncreate()?
- system on shortage of memory, killed process of app. user navigates app,
oncreate()called non-nullbundle. - after configuration change (e.g. orientation change) -
oncreate()called non-nullbundle.
if not explicitly call onsaveinstancestate()
you shouldn't on own. it's system call activity lifecycle methods , onsavedinstancestate/onrestoreinstancestate.
Comments
Post a Comment