How to manage multiples activities under a single tab of TabActivity
<p>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.</p>

<p>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).</p>

<p>To start new activities inside the tabs, I used the technique described here <a href="http://gamma-point.com/content/android-how-have-multiple-activities-under-single-tab-tabactivity" rel="nofollow">http://gamma-point.com/content/android-how-have-multiple-activities-under-single-tab-tabactivity</a></p>

<p>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.</p>

<p>So here are my two real problems:  </p>

<ul>
<li><p>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 <i>Intent.FLAG_ACTIVITY_CLEAR_TOP</i>. So when I do several roundtrips between this activity and the next one, i obtain a StackErrorOverFlow.  </p></li>
<li><p>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.</p></li>
</ul>

<p>Thanks for your help,
and if I'm not understandable, please, let me know !</p>
