Hi all,
Here's the problem. In my app, I have 5 tabs which contains activities. In each of them, I have to show differents screens. For example, the main activity of a tab is a listview, and when I click on one of its item, I want to display a second screen with an other listview, that will display an other screen when the user will select an item etc.
So I knew that activities in tabs are not easy to manage, but I really think that I needed this solution. Indeed, each screen must contain a back button, which will return to the previous screen, with the previous state (the same position in the list).
To start new activities inside the tabs, I used the technique described here http://gamma-point.com/content/android-how-have-multiple-activities-under-single-tab-tabactivity
It works mostly well, but I encounter a problem to go back to the previous activities. My solution at the moment consists in starting the previous activity like it's described on this website, but without any flag.
So here are my two real problems:
When I try to go back to the first and main activity of the tab, it seems that a new instance is created, even if I use the flag Intent.FLAG_ACTIVITY_CLEAR_TOP. So when I do several roundtrips between this activity and the next one, i obtain a StackErrorOverFlow.
Because the activities are accessible from differents activities, I have to memorize the parents activities all the time, by giving them in the intents. It's really heavy when I have a succession of 5 or 6 screens, I have to memorize the grand grand parent if the activity... I really appreciate if I just could call the last Activity started by the localActivityManager.
Thanks for your help, and if I'm not understandable, please, let me know !