title: FragmentTabHost add tab with image and textview
body: <p>I have one  <code>FragmentTabhost</code> XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;android.support.v4.app.FragmentTabHost 
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/tabhost"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:layout_gravity="center"
  android:clickable="true" &gt;
  
  &lt;LinearLayout
      android:id="@+id/tabs"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical"
      android:weightSum="1" &gt;
  
      &lt;View
          android:layout_width="fill_parent"
          android:layout_height="1px"
          android:background="@color/whte" /&gt;
  
      &lt;TabWidget
          android:id="@android:id/tabs"
          android:layout_width="fill_parent"
          android:layout_height="0dp"
          android:layout_weight="0.09"
          android:background="@drawable/tabwidget"
          android:dividerPadding="0dip"
          android:gravity="center"
          android:showDividers="middle" &gt;
      &lt;/TabWidget&gt;
  
      &lt;View
          android:layout_width="fill_parent"
          android:layout_height="1px"
          android:background="@color/whte" /&gt;
  
      &lt;LinearLayout
          android:id="@+id/searchcont"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_gravity="center"
          android:background="@drawable/search_background"
          android:clickable="false"
          android:focusable="false"
          android:focusableInTouchMode="false"
          android:gravity="center_vertical"
          android:orientation="horizontal"
          android:visibility="gone" &gt;
  
          &lt;FrameLayout
  
              android:layout_width="fill_parent"
              android:layout_height="match_parent"
              android:layout_gravity="center"
              android:paddingLeft="4dp"
              android:textAlignment="viewStart" &gt;
  
              &lt;EditText
                  android:id="@+id/search_text"
                  android:layout_width="100dp"
                  android:layout_height="10dp"
                  android:layout_marginLeft="2dp"
                  android:layout_weight="1"
                  android:ems="10"
                  android:hint="@string/searchedit"
                  android:imeOptions="actionSearch"
                  android:inputType="textPersonName"
                  android:maxLines="1"
                  android:paddingBottom="1dp"
                  android:paddingLeft="10dp"
                  android:paddingTop="1dp" &gt;
  
                  &lt;requestFocus /&gt;
              &lt;/EditText&gt;
  
              &lt;ProgressBar
                  android:id="@+id/serach_progress"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="right|center"
                  android:layout_marginRight="5dp"
                  android:visibility="invisible" /&gt;
          &lt;/FrameLayout&gt;
      &lt;/LinearLayout&gt;
  
      &lt;FrameLayout
          android:id="@android:id/tabcontent"
          android:layout_width="fill_parent"
          android:layout_height="0dp"
          android:layout_weight="1" &gt;
      &lt;/FrameLayout&gt;
  
      &lt;View
          android:layout_width="fill_parent"
          android:layout_height="1px"
          android:layout_marginBottom="1dp"
          android:background="@color/black" /&gt;
  
      &lt;FrameLayout
          android:id="@+id/footer"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:layout_weight="0.08"
          android:background="@color/footer_color" &gt;
  
          &lt;LinearLayout
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_gravity="clip_vertical|right"
              android:orientation="horizontal"
              android:weightSum="1" &gt;
  
              &lt;FrameLayout
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_gravity="center|left"
                  android:layout_weight="0.65" &gt;
  
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:layout_gravity="left"
                      android:gravity="left"
                      android:weightSum="1" &gt;
  
                      &lt;ImageView
                          android:id="@+id/bottom_currency"
                          android:layout_width="0dp"
                          android:layout_height="25dp"
                          android:layout_gravity="left|center_vertical"
                          android:layout_marginLeft="7dp"
                          android:layout_marginRight="7dp"
                          android:layout_weight="0.15"
                          android:src="@drawable/amd_icom" /&gt;
  
                      &lt;TextView
                          android:id="@+id/amount"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_gravity="left|center_vertical"
                          android:layout_marginRight="10dp"
                          android:gravity="left"
                          android:text="Large Text"
                          android:textAppearance="?android:attr/textAppearanceLarge"
                          android:textColor="@color/whte"
                          android:textSize="32dp" /&gt;
  
                      &lt;ImageView
                          android:id="@+id/setnewpin"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_gravity="left|center_vertical"
                          android:src="@drawable/refill" /&gt;
  
                  &lt;/LinearLayout&gt;
              &lt;/FrameLayout&gt;
  
              &lt;FrameLayout
                  android:id="@+id/newpincont"
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_gravity="center|center_vertical"
                  android:layout_weight="0.35"
                  android:paddingTop="3dp"
                  android:visibility="invisible" &gt;
  
             &lt;EditText
                 android:id="@+id/pinvalue"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
                 android:ems="10"
                 android:hint="@string/pin_edit_hint_text"
                 android:imeOptions="actionGo"
                 android:inputType="number"
                 android:maxLength="4"
                 android:paddingBottom="1dp"
                 android:paddingLeft="10dp"
                 android:paddingTop="1dp" /&gt;
  
             &lt;ImageView
                 android:id="@+id/sendnewpin"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="right|center_vertical"
                 android:src="@drawable/submit_pin" /&gt;
  
              &lt;/FrameLayout&gt;
  
          &lt;/LinearLayout&gt;
       &lt;/FrameLayout&gt;
        &lt;/LinearLayout&gt;
  
        &lt;/android.support.v4.app.FragmentTabHost&gt;
  </code></pre>
  
  <p>I added in FragmentTabhost 3 tabs:</p>
  
  <pre><code>View view=inflater.inflate(R.layout.main, container, false);
      mTabHost = (FragmentTabHost)view.findViewById(R.id.tabhost);
      mTabHost.setup(getActivity().getApplicationContext(),getChildFragmentManager(),android.R.id.tabcontent);
      Bundle arg1 = new Bundle();
      arg1.putInt("Arg for Frag1", 1);
      mTabHost.addTab(mTabHost.newTabSpec("Tab1").setIndicator(prepareTabView(getString(R.string.playlist), R.drawable.library_icon)),
              PlayListFragment.class, arg1);
      Bundle arg2 = new Bundle();
      arg2.putInt("Arg for Frag2", 2);
      mTabHost.addTab(mTabHost.newTabSpec("Tab2").setIndicator(prepareTabView(getString(R.string.playlist), R.drawable.queue_icon)),
              PlayListFragment.class, arg2);
  
      Bundle arg3 = new Bundle();
      arg3.putInt("Arg for Frag3", 3);
      mTabHost.addTab(mTabHost.newTabSpec("Tab3").setIndicator(prepareTabView(getString(R.string.search), R.drawable.search_icon)),
      SearchFragment.class, arg3);
  </code></pre>
  
  <p>where <code>prepareTabView</code> medot for create tabs icon.
  after this on 3 tabs only icon drawing ,text gone.</p>
  
  <p><img src="https://i.stack.imgur.com/EWYSbl.png" alt=""></p>
  
  <p>I want and icon and textview.</p>
  
  <p><img src="https://i.stack.imgur.com/TheRAl.jpg" alt=""></p>