title: ClassCastException when using FragmentTabHost
body: <p>I am using <a href="http://developer.android.com/reference/android/support/v4/app/FragmentTabHost.html" rel="nofollow">FragmentTabHost</a> with android support library, </p>
  
  <p>My layout file <strong>sub_main.xml</strong>:</p>
  
  <pre><code>&lt;android.support.v4.app.FragmentTabHost 
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@android:id/tabhost"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" &gt;
  
     &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:orientation="vertical" &gt;
  
          &lt;TabWidget
              android:id="@android:id/tabs"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_weight="0"
              android:orientation="horizontal" /&gt;
  
          &lt;FrameLayout
              android:id="@+id/tabFrameLayout"
              android:layout_width="fill_parent"
              android:layout_height="0dp"
              android:layout_weight="1" /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/android.support.v4.app.FragmentTabHost&gt;
  </code></pre>
  
  <p>The above layout is used in my fragment:</p>
  
  <pre><code>   public class MyFragment extends Fragment{
         ...
         private FragmentTabHost mTabHost;
         private View content;
  
        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
              super.onCreateView(inflater, container, savedInstanceState);
  
              View content = inflater.inflate(R.layout.sub_main, null); 
  
              // the following code throw ClassCastException, why?
              mTabHost = (FragmentTabHost) content.findViewById(android.R.id.tabhost);
  
              return content;
          }
     ...
  }
  </code></pre>
  
  <p>But, I got the <strong>ClassCastException</strong> exception in the above code where <code>mTabHost</code> is initialized in onCreateView() :</p>
  
  <pre><code>07-03 16:35:09.704: E/AndroidRuntime(25350): java.lang.ClassCastException: android.widget.TabHost cannot be cast to android.support.v4.app.FragmentTabHost
  </code></pre>
  
  <p>It complains that <code>TabHost</code> can not be cast to <code>FragmentTabHost</code>, why &amp; how to get rid of it. Thanks.</p>