In my activity saveInstanceState is called when I move to the next activity (ex.: activity A starts Activity B and activity A’s saveInstanceState is called) – is it normal behaviour? As far as I understand (from documentation), saveInstanceState is called when OS shuts down process to reclaim resources.
In my activity saveInstanceState is called when I move to the next activity (ex.:
Share
Whenever your activity disappears from the screen, the state will be saved for further representations.
Say you perform a screen orientation change. As you might know, whenever this happens the view is recreated completely.
The way Android does it to keep the state of things is to save the state before destroying and re-creating.