P
P
Pavel2015-02-24 13:10:57
Android
Pavel, 2015-02-24 13:10:57

How to correctly work with an activity set?

While studying development for android, some questions arose about working with activity. How all the same competently to carry out transitions between them?
In most tutorials, for some reason, the question of activation is mentioned in passing, they say there is an Intent, startActivity, so you learned how to call one activity from another. But for some reason, this method seems doubtful to me, because if I recursively start calling the same activity, and then using the back button I try to “close” the application, then until everything that was opened is closed, the application will also not “close”
In one of In the tutorials, it was mentioned that during the operation of the application a stack of these activities is formed, some cursed that the author does not make the transitions between them correctly, they say, thereby overloading this stack.
So, the question is. Is this stack formed after the program is launched and then supplemented or during operation, gradually adding activities there? If it is, then surely there must be ways to manipulate this stack? Can I prepare this stack in advance and then call the activity from it?
I just want to make adequate navigation in the application.
(I understand that perhaps this is in the documentation, but my level of English allows me to translate only in general terms, and, as they say, the devil is in the details. Therefore, I have not figured out this issue)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Copperfield, 2015-02-24
@PaulTMatik

One time two and thousands more articles in Russian

E
EmachinesDIMA, 2015-02-25
@EmachinesDIMA

c destroy() stop() resume() play around. find this " Implementing the lifecycle callbacks " at this link
developer.android.com/guide/components/activities.html
then you will not overload the memory. In general, it's better to work with fragments.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question