I am learning android app development. I am reading about how activities are managed by the system.
By reading this documentation. Here is the confusion.
As per the documentation system only pushes and pops the activity (No reordering, which makes sense for a stack) But, it states system can reclaim memory in case not enough memory is available. And to pick which activity to remove system always picks the one which is in background. So say its removing activity A3. But A3 is at bottom of the stack. How can it remove A3 without reordering the stack for app A?
I hope I am clear with my question
Thank You,
The back stack is not changed when an activity is removed from memory.
However, when the user hits the back button and goes back to an activity that has been reclaimed, then any state you do not specifically save in your onSaveInstanceState() (and reload from the savedInstanceBundle argument in onCreate()) will be lost.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With