I have two activities, one is a list for item, the other one is the edit view for the item. When user clicks the item in the first view, the second edit view will show.
In android the stack based mechanism, if I do this the behavior is weird.
List view -> click -> edit view -> save -> list view -> click -> edit ->… it’s a loop.
If I edit and save the item several times the stack will be full of list view & edit view…
Now the user wants to press back key to exit the program, by stack based activity manager, the user will meet up many times of the two activities.
What’s the recommend way to resolve this issue?
Pardon me if I’m wrong but I think you handle the Edit->List switching with a startActivity().
I think you should just
finish()your activity when you handle save (letting activity stack go back to List)