Creating a tab activity with one activity and views. Getting "could not create tab content because could not find view with id"
<p>I followed the example in the Android website to create a tab activity with multiple activities. Now I am trying to have it as Single activity and multiple views. I am getting the following exception</p>

<p>Java.lang.RuntimeException : Could not create tab content because could not find the view by id </p>

<p>This is my layout file.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rootTbl" android:layout_width="fill_parent"
    android:layout_height="fill_parent"&gt;

    &lt;TabHost android:id="@android:id/tabhost" android:layout_width="fill_parent"
        android:layout_height="fill_parent"&gt;
        &lt;LinearLayout android:orientation="vertical"
            android:layout_width="fill_parent" android:layout_height="fill_parent"&gt;
            &lt;TabWidget android:id="@android:id/tabs"
                android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt;          
            &lt;FrameLayout android:id="@android:id/tabcontent"
                android:layout_width="fill_parent" android:layout_height="wrap_content"
                android:layout_weight="1"/&gt;
                &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/assignedLin" &gt;
                &lt;TextView android:id="@+id/dateassigned" style="@style/deftxtView"/&gt;
                &lt;ListView android:id="@+id/assignedListView" android:layout_width="match_parent" android:layout_height="300dp"/&gt;
                &lt;/LinearLayout&gt;     

                &lt;!--TableLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/assignedTbl" &gt;
                &lt;TableRow android:layout_width="fill_parent" android:layout_height="fill_parent"&gt;
                    &lt;TextView android:id="@+id/dateassigned" style="@style/deftxtView"/&gt;
                &lt;/TableRow&gt;

                &lt;TableRow android:layout_width="fill_parent" android:layout_height="fill_parent"&gt;
                &lt;ListView android:id="@+id/assignedListView" android:layout_width="match_parent" android:layout_height="300dp"/&gt;
                &lt;/TableRow&gt;
                &lt;/TableLayout--&gt;

                &lt;TableLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/acceptedTbl" &gt;
                &lt;TableRow android:layout_width="fill_parent" android:layout_height="fill_parent"&gt;
                    &lt;TextView android:id="@+id/dateaccepted" style="@style/deftxtView"/&gt;
                &lt;/TableRow&gt;

                &lt;TableRow android:layout_width="fill_parent" android:layout_height="fill_parent"&gt;
                &lt;ListView android:id="@+id/acceptedListView" android:layout_width="match_parent" android:layout_height="300dp"/&gt;
                &lt;/TableRow&gt;
                &lt;/TableLayout&gt;
        &lt;/LinearLayout&gt;
    &lt;/TabHost&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>this is my java file</p>

<pre><code>package com.tcs.mServices;

import java.util.ArrayList;

import com.tcs.mLib.DBAdapter;
import com.tcs.mServicesBO.FFA_CONTACT_DETAILS;
import com.tcs.mServicesBO.FFA_SERVICE_REQUEST;

import android.app.TabActivity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.database.Cursor;
import android.os.Bundle;
import android.widget.ListView;
import android.widget.TabHost;
import android.widget.TextView;
import android.widget.TabHost.OnTabChangeListener;

public class TabActivityScreen extends TabActivity {

    private static DBAdapter dbAdapter;
    private static Context context;
    private static InteractiveAdapter interactiveAdapter;
    private static ListView assignedListView;

    /** Called when the activity is first created. */
    @SuppressWarnings("unchecked")
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tabactivityscreen);

        ArrayList&lt;FFA_SERVICE_REQUEST&gt; ffa_Service_Requests=(ArrayList&lt;FFA_SERVICE_REQUEST&gt;) this.getIntent().getExtras().get("ffa_service_RequestBO");
        ArrayList&lt;FFA_CONTACT_DETAILS&gt; ffa_Contact_Details=(ArrayList&lt;FFA_CONTACT_DETAILS&gt;) this.getIntent().getExtras().get("ffa_Contact_DetailsBO");

    /* 
     * Tab Related Code
     * 
     */ 


    Resources res = getResources(); // Resource object to get Drawables
    final TabHost tabHost = getTabHost();  // The activity TabHost       
    TabHost.TabSpec spec;  // Resusable TabSpec for each tab
    final Intent assignedIntent;  // Reusable Intent for each tab
    final Intent acceptedIntent;
    final Intent returnedIntent;
    final Intent completedIntent;



    // Create an Intent to launch an Activity for the tab (to be reused)
    assignedIntent = new Intent().setClass(this, AssignedActivity.class);
    assignedIntent.putExtra("ffa_service_RequestBO", ffa_Service_Requests);
    assignedIntent.putExtra("ffa_Contact_DetailsBO", ffa_Contact_Details);

    // Initialize a TabSpec for each tab and add it to the TabHost
   /* spec = tabHost.newTabSpec("ASSIGNED").setIndicator("Assigned")
                  .setContent(assignedIntent);*/
    spec = tabHost.newTabSpec("ASSIGNED").setIndicator("Assigned")
    .setContent(R.id.assignedLin);
    tabHost.addTab(spec);   


    acceptedIntent = new Intent().setClass(this, AcceptedActivity.class);

    // Initialize a TabSpec for each tab and add it to the TabHost
/*    spec = tabHost.newTabSpec("ACCEPTED").setIndicator("Accepted")
                  .setContent(acceptedIntent);*/
    spec = tabHost.newTabSpec("ACCEPTED").setIndicator("Accepted")
    .setContent(R.id.acceptedTbl);
    tabHost.addTab(spec);

    returnedIntent = new Intent().setClass(this, ReturnedActivity.class);
    spec = tabHost.newTabSpec("RETURNED").setIndicator("Returned")
                        .setContent(returnedIntent);
    tabHost.addTab(spec);

    completedIntent = new Intent().setClass(this, CompletedActivity.class);
    spec = tabHost.newTabSpec("COMPLETED").setIndicator("Completed")
                        .setContent(completedIntent);
    tabHost.addTab(spec);

    tabHost.getTabWidget().getChildAt(0).getLayoutParams().height=75;
    tabHost.getTabWidget().getChildAt(1).getLayoutParams().height=75;
    tabHost.getTabWidget().getChildAt(2).getLayoutParams().height=75;
    tabHost.getTabWidget().getChildAt(3).getLayoutParams().height=75;

    tabHost.setCurrentTab(0);

    tabHost.setOnTabChangedListener(new OnTabChangeListener(){
        public void onTabChanged(String tabId){
            if("ASSIGNED".equals(tabId)){
                tabHost.setCurrentTabByTag(tabId);
            }else if("ACCEPTED".equals(tabId)){
                tabHost.setCurrentTabByTag(tabId);
            }
        }
    });  


    }

}
</code></pre>

<p>I had it like many activities for the tabs. While trying to make it as views getting some problem. Pls help</p>
