Reputation: 153
How to switch between screens?
I looked and attempted the above code, and while it does work, it's not what I'm looking for.
In the above example, you open one intent, and then close it when you're done with it. Another example from above showed that I could create new intents endlessly, but then clicking on the Back button of the Android Device makes me go back once for each new intent created, implying that it's going to eat up memory this way.
What I would like to attempt to do is to move between instances of Intents. There will be times when the screens could allow for an endless, memory eating circle of moving between screens.
For example, Screen1 has a button leading to Screen2. Screen2 can lead back to Screen1, or to Screen3. Screen3 can then go back, or go straight back to Screen1. Is there any way to avoid the memory leak for a large number of screens/screen changing/drilling down(Screen1 eventually leading to Screen12 or something)?
Upvotes: 0
Views: 185