I have a main Activity takes a while to load, as it reads the customer base and load screen. When I call another Activity (which shows outstanding customer receipts), to give the “back” button I load the main Activity instantly. However when I call the other Activitys (Orders, History, etc. ..), to give the “back” button takes a while to show again Customers. It’s like one of the Activity does not destroy the main Activity, and the rest if you destroy it. All are created in the same way (I think). Can this happen? What to call an Activity is not destroyed the main? Can be a memory issue?
Share
Under normal circumstances, when going from one
Activityto the other, the firstActivityis not destroyed. It’s pushed on to a backstack so that you can immediately go back to it when the user presses “back”.Its contents can however be destroyed if the current top
Activitytakes up too much memory. The Android OS will free up the resources from the activities in the back stack in order to accommodate the needs of the foreground activity. In this event, the activity will effectively be “restarted” and must be rebuilt when the user presses “back”.