Single tab multiple views
<p>Can someone throw more light on how can one have multiple views within the same tab? I have 3 tabs.
I have used a FragmentActivity to load the content of the 1st tab, which is a ListFragment. On click of any item of the list another list of subItems must get displayed. To do this I am using an inner static FragmentActivity class, which in turn adds a new fragment dynamically which displays the new list. But In the new Fragment I do not get to see my 1st tab.</p>

<p>How can I switch between Fragments or Views keeping my Tab intact?</p>

<hr>

<p>Still not able to achieve it...my code is as given below:</p>

<pre><code>       public void onListItemClick(ListView l, View v, int position, long id) 
    {           
        getListView().setItemChecked(position, true);

        DetailsFragment details = (DetailsFragment)
                getFragmentManager().findFragmentById(R.id.titles);

        if (details == null || details.getShownIndex() != position) 
        {               
            details = DetailsFragment.newInstance(position);                
            FragmentTransaction ft = getFragmentManager().beginTransaction();
            ft.replace(R.id.titles, details);
            ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
            ft.commit();
        }
   }
</code></pre>

<p>The layout file is as below:</p>

<pre><code> &lt;?xml version="1.0" encoding="utf-8"?

&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent" 
         android:layout_height="match_parent"&gt;

   &lt;fragment class="com.example.myapp.NewReqScrLoader$TitlesFragment"
          android:id="@+id/titles"
          android:layout_width="match_parent" 
          android:layout_height="match_parent" /&gt; 

&lt;/FrameLayout&gt;
</code></pre>

<p>Am I going wrong somewhere?</p>
