탭을 클릭할때마다 탭의 내용을 다른 엑티비티의 내용으로 보여주고 싶습니다.

TabActivity를 상속받고 구현할 때는 잘 됩니다.
------------------------------------------------------------------------
public class IntentTabDemo extends TabActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        TabHost host=getTabHost();
       
        host.addTab(host.newTabSpec("one")
                        .setIndicator("CW")
                        .setContent(new Intent(this, CWBrowser.class)));
        host.addTab(host.newTabSpec("two")
                        .setIndicator("Android")
                        .setContent(new Intent(this, AndroidBrowser.class)));
    }
}
-------------------------------------------------------------------------------------------


그런데 제가 원하는 방법은 TabActivity대신 일반 Activity를 상속받고
레이아웃에서 TabHost객체를 얻고와서 탭 구현을 하고 싶습니다.

main.xml
---------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
      <TabHost android:id="@+id/ranktabhost"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
       
            <TabWidget android:id="@android:id/tabs"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" />
           
            <FrameLayout android:id="@android:id/tabcontent"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:paddingTop="64px">
               
            </FrameLayout>
        
       </TabHost>
</LinearLayout>

---------------------------------------------------------------------------------------------



Test.java
---------------------------------------------------------------------------------------------
public class Test extends Activity {
 @Override
 public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
   
    setContentView(R.layout.main);
     
    TabHost host = (TabHost) findViewById(R.id.ranktabhost);
    host.setup(new LocalActivityManager(getParent(), false));

    host.addTab(host.newTabSpec("one")   //<---------34번째줄
            .setIndicator("CW")
            .setContent(new Intent(this, CWBrowser.class)));
    host.addTab(host.newTabSpec("two")
            .setIndicator("Android")
            .setContent(new Intent(this, AndroidBrowser.class)));
 }
}
---------------------------------------------------------------------------------------------


오류내용
------------------------------------------------------------------------------------------
03-26 14:44:27.540: ERROR/AndroidRuntime(6329): Uncaught handler: thread main exiting due to uncaught exception
03-26 14:44:27.610: ERROR/AndroidRuntime(6329): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jptomato.android.test/com.jptomato.android.test.Test}: java.lang.IllegalStateException: Activities can't be added until the containing group has been created.
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at android.app.ActivityThread.access$2100(ActivityThread.java:116)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at android.os.Handler.dispatchMessage(Handler.java:99)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at android.os.Looper.loop(Looper.java:123)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at android.app.ActivityThread.main(ActivityThread.java:4203)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at java.lang.reflect.Method.invokeNative(Native Method)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at java.lang.reflect.Method.invoke(Method.java:521)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at dalvik.system.NativeStart.main(Native Method)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329): Caused by: java.lang.IllegalStateException: Activities can't be added until the containing group has been created.
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:254)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:631)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at android.widget.TabHost.setCurrentTab(TabHost.java:317)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at android.widget.TabHost.addTab(TabHost.java:210)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at com.jptomato.android.test.Test.onCreate(Test.java:34)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
03-26 14:44:27.610: ERROR/AndroidRuntime(6329):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
------------------------------------------------------------------------------------------------------------------------------------


제 생각으로는 아마도
 host.setup(new LocalActivityManager(getParent(), false)); 이나
main.xml의 FrameLayout부분이 잘못된거 같긴하지만
여러번 테스트를 해봐도 어떻게 해야 좋을지 잘 모르겠습니다.

위의 프로젝트 파일을 첨부파일로 첨부합니다.
도와주시면 고맙겠습니다.