An Exception occur in Tablayout
<p>I wanna add three layout in a TabActivity, but it was force closed when I ran it.</p>

<h2>Here is the code:</h2>

<p>import android.app.TabActivity;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;</p>

<p>public class Test1 extends TabActivity {</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.main);
     Resources res = getResources(); 
     TabHost tabHost = getTabHost();      

    tabHost.addTab(tabHost.newTabSpec("egcquery").setIndicator("EGCQuery").setContent(R.layout.main1)); 
    tabHost.addTab(tabHost.newTabSpec("PatientInfo").setIndicator("PatientInfo").setContent(R.layout.main2)); 
    tabHost.addTab(tabHost.newTabSpec("Comp_Interp").setIndicator("Comp_Interp").setContent(R.layout.main3));
}
</code></pre>

<p>}</p>
