title: FATAL EXCEPTION : you must specify a way to create the tab content
body: <p>Im try to make customized menu tab for my app, then im found the similiar source with my needed stuf, im combined the code from here <a href="http://pmsdobak.tistory.com/entry/Custom-Tab-%EA%B5%AC%ED%98%84" rel="nofollow">source1</a> and here <a href="http://joshclemm.com/blog/?p=136" rel="nofollow">source2</a>
  but when try to running im got FATAL EXCEPTION like this :</p>
  
  <pre><code>06-03 16:30:05.305: E/AndroidRuntime(633): FATAL EXCEPTION: main
  06-03 16:30:05.305: E/AndroidRuntime(633): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hynra.seribucandi/com.hynra.seribucandi.CandiAbang}: java.lang.IllegalArgumentException: you must specify a way to create the tab content
  06-03 16:30:05.305: E/AndroidRuntime(633):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at android.os.Handler.dispatchMessage(Handler.java:99)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at android.os.Looper.loop(Looper.java:123)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at android.app.ActivityThread.main(ActivityThread.java:3683)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at java.lang.reflect.Method.invokeNative(Native Method)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at java.lang.reflect.Method.invoke(Method.java:507)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at dalvik.system.NativeStart.main(Native Method)
  06-03 16:30:05.305: E/AndroidRuntime(633): Caused by: java.lang.IllegalArgumentException: you must specify a way to create the tab content
  06-03 16:30:05.305: E/AndroidRuntime(633):  at android.widget.TabHost.addTab(TabHost.java:202)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at com.hynra.seribucandi.CandiAbang.setupTab(CandiAbang.java:55)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at com.hynra.seribucandi.CandiAbang.onCreate(CandiAbang.java:36)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  06-03 16:30:05.305: E/AndroidRuntime(633):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
  06-03 16:30:05.305: E/AndroidRuntime(633):  ... 11 more
  </code></pre>
  
  <p>Here the java file </p>
  
  <pre><code>package com.hynra.seribucandi;
  
  import android.app.TabActivity;
  import android.content.Context;
  import android.os.Bundle;
  import android.os.Handler;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.widget.TabHost;
  import android.widget.TextView;
  import android.widget.TabHost.TabContentFactory;
  import android.widget.TabHost.TabSpec;
  import android.content.Intent;
  import android.widget.ImageView;
  
  
  public class CandiAbang extends TabActivity {
      final static String INFO = "Info";
      final static String MAP = "Map";
      final static String GALL = "Gallery";
  
      private TabHost tabHost;
      private void setupTabHost() {
          tabHost = (TabHost) findViewById(android.R.id.tabhost);
          tabHost.setup();
      }
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.c_abang);
  
          setupTabHost();
          tabHost.getTabWidget().setDividerDrawable(R.drawable.tab_divider);
  
          setupTab(new TextView(this), "INFO");
          setupTab(new TextView(this), "MAP");
          setupTab(new TextView(this), "GALL");
          tabHost.setCurrentTab(0);
  
      }
  
  
      private void setupTab(final View view, final String tag) {
          View tabview = createTabView(tabHost.getContext(), tag);
          TabSpec setContent = tabHost.newTabSpec(tag).setIndicator(tabview);
  
          if(tag.equals(INFO))
              setContent.setContent(new Intent(this, AbangInfo.class));
          else if(tag.equals(MAP))
              setContent.setContent(new Intent(this, AbangMap.class));
          else if(tag.equals(GALL))
              setContent.setContent(new Intent(this, AbangGall.class));
  
          tabHost.addTab(setContent);
  
          }
  
      private static View createTabView(final Context context, final String text) {
      View view = LayoutInflater.from(context).inflate(R.layout.tab2_bg, null);
      TextView tv = (TextView) view.findViewById(R.id.tabsText);
      tv.setText(text);
      return view;
      }
  
  
  
  }
  </code></pre>
  
  <p>And this for the Layout file </p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      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="fill_parent"
                      /&gt; 
          &lt;/LinearLayout&gt;
      &lt;/TabHost&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>For the background selector im using this :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="@drawable/tab2_selector"
      android:padding="10dip"
      android:gravity="center"
      android:orientation="vertical"
      &gt;
      &lt;ImageView
          android:id="@+id/tabsImage"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          /&gt;
      &lt;TextView
          android:id="@+id/tabsText"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Title"
          android:textSize="12dip"
          android:textColor="@drawable/tab2_text"
          /&gt; &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>When im running, i just got exception warning : <strong>you must specify a way to create the tab content</strong> how can i solved this problem ? help me. Thanks before</p>