I have this scenario where I have a Main Activity and an Article Activity. The Main Activity opens an Article Activity, then if you click on a related article from the Article Activity, it opens the same activity again with the requested related article. So basically you can open 10 Article Activities on the top of each other and go back through every single one of them onBackPress() until you reach the Main Activity again. But the client also want a button that should send you directly back to the Main Activity without having to cycle through the entire BackStack again.
- Basically we have MA -> AA -> AA -> AA -> (...).
- On Back Press you should go back like MA <- AA <- AA <- AA sequentially through every new instance.
- On Close All button press you should close all AA instances and go back straight to MA.
P.S. I don't want to lose the instance of MA. It should always be there in the backstack as the starting point.
How do I do this?