Multiple Activities in TabActivity
<p>I have a TabActivity that has three tabs.  The fist tab is the problem.  The first tab loads an ActivityGroup.  OnCreate it loads a default content view.  Later on a certain event, we add a different content view.  This works fine, but my problem is when someone presses the back button on the phone after the second content view gets loaded.  It takes them to the last Activity instead of taking them to the first content view that was added in the ActivityGroup.  How can I redirect the back button to call a method in my ActivityGroup?</p>

<p>I am constructing it this way that I might have multiple views(Activities) within one tab.  Any ideas on how to redirect the back button event to my own method? That would be easy and nice.</p>

<p>In case the code is helpful:</p>

<pre><code>public class LiveTabGroup extends ActivityGroup implements MoveToScreenNotification.handler
</code></pre>

<p>{</p>

<pre><code>/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);

    EventBus.subscribe(MoveToScreenNotification.class, this);

    View view = getLocalActivityManager().startActivity("CameraListView", new Intent(this,CameraListView.class).
            addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView();

    this.setContentView(view);

}

@Override
public void onMoveToScreenNotification(MoveToScreenNotification notif) 
{
    if (notif.newScreen == MoveToScreenNotification.SCREEN_MOVIEPLAYER_LIVE)
    {
        SugarLoafSingleton.currentCamera.url = notif.videoURL;
        // Throw UI management on main thread
        runOnUiThread(new Runnable(){
        public void run()
        {
            StartPlayer();
        }
        });

    }

}

public void StartPlayer()
{
    View view = getLocalActivityManager().startActivity("VideoPlayer", new Intent(this,VideoPlayerView.class).
            addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView();

    this.addContentView(view, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,ViewGroup.LayoutParams.FILL_PARENT));


}
</code></pre>

<p>}</p>
