I have read this article: http://developer.android.com/guide/components/tasks-and-back-stack.html
If I read it correctly it says you can create a new task with a new activity while the old task still has a backstack. They are also talking about returning to an old taks. However I did not find how to implement this.
What I want:
I have a navigation drawer. I want to click an item. When back is pressed it goes back to the root. But if you click another item, the backstack is saved in the current task. Then a new backstack is created in this other item. When clicking the first item again I want to go to the top of the backstack, so continuing where you were.
Example:
- A1 -> A2 -> A3 (drawer item clicked) (so backstack is (A1, A2, A3))
- A1 -> A4 -> A5 (last drawer item clicked)
- A3 (With in backstack A1, A2, A3)
Is this possible?
NOTE: I work with activities, it is a large app and activities are easier to maintain.