I have a view of the wizard in the application, through 6 activities.
therefore I call:
Main activity - Call option 1 - Call option 2 - Call option 3 - Call option 4 - Call option 5
Now, in Option 5, I am saving the entire action in the database, and at this point I need to return to the main activity and destroy Option1,2,3,4 and 5.
Until option 5 saves the database, I need to go back, make changes, go to option 5 and save it.
The right way to do this is to somehow create a method that would have:
private void cleanStack(){ Option1.finish(); Option2.finish(); Option3.finish(); Option4.finish(); Option5.finish(); }
And then start (or resume) the main activity?
Tpx
source share