title: Making Custom TabHost and TabWidget in Android
body: <p>I want to make a TabHost like that image . where i can use my own image as background of TabWidget.                    : <img src="https://i.stack.imgur.com/YTKf0.png" alt="enter image description here"></p>
  
  <p>and want to remove default background (showing by a red arrow in this image). Code for doing this.`                                                                                                    </p>
  
  <pre><code>&lt;TabHost 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:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:padding="5dp"&gt;
  
      &lt;FrameLayout
          android:id="@android:id/tabcontent"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:padding="5dp"
          android:layout_weight="1"/&gt;
  
      &lt;TabWidget
          android:id="@android:id/tabs"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_weight="0"
  
          android:background="@drawable/navbar_glass"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      TabHost tabHost = getTabHost();
      //tabHost.getTabWidget().setStripEnabled(false);
      tabHost.getTabWidget().setFocusable(false);
      // Tab for Photos
      TabSpec photospec = tabHost.newTabSpec("Chats");
      photospec.setIndicator("Chats", getResources().getDrawable(R.drawable.chat_button));
      Intent photosIntent = new Intent(this, PhotosActivity.class);
      photospec.setContent(photosIntent);
  
  
      TabSpec photospec2 = tabHost.newTabSpec("Friends");
      photospec2.setIndicator("Friends", getResources().getDrawable(R.drawable.friend_button));
      Intent photosIntent2 = new Intent(this, PhotosActivity.class);
      photospec2.setContent(photosIntent2);
  
      // Tab for Songs
      TabSpec songspec = tabHost.newTabSpec("Library");
      // setting Title and Icon for the Tab
      songspec.setIndicator("Library", getResources().getDrawable(R.drawable.library_button));
      Intent songsIntent = new Intent(this, SongsActivity.class);
      songspec.setContent(songsIntent);
  
      // Tab for Videos
      TabSpec videospec = tabHost.newTabSpec("Settings");
      videospec.setIndicator("Settings", getResources().getDrawable(R.drawable.setting_button));
      Intent videosIntent = new Intent(this, VideosActivity.class);
      videospec.setContent(videosIntent);
  
      // Adding all TabSpec to TabHost
      tabHost.addTab(photospec); // Adding photos tab
      tabHost.addTab(songspec); // Adding songs tab
      tabHost.addTab(videospec); // Adding videos tab
      tabHost.addTab(photospec2);
  }
  </code></pre>
  
  <p>`</p>