android - How can I stop repeating backing? -
i'm developing application more 3 classes. app working this:
i jumped main activity class , 3-rd class , came 2-nd class , 3-rd class again.
my problem when pressed button when in 3-rd went 2-nd , 3-rd , came again 2-nd 1-st home.
i want stop process.
i think problem when came second class third class, didn't destroy third class instance. started new activity, startactivity(second class). every time switched class, create new activity instance without destroy previous one. doing repeatedly, many activity instances kept in task stack. if don't wanna repeat, have destroy previous activity, or change implementation. can create customized stack yourself, , add or remove class instances view not activity. 1->(add)2->(add)3->(remove 3)2->(add)3->(remove 3)2->(remove 2)1.
Comments
Post a Comment