title: Android remove space between tabs in tabwidget
body: <p>I have made an application which has tabs like in HelloTabActivity, there is also space between these tabs, can anyone suggest how to remove this space and also there is a grey line beneath the tabs how can that be removed?</p>
  
  <p><img src="https://i.stack.imgur.com/JVXp9.png" alt="enter image description here"></p>
  
  <p><strong>main.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &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"
          android:padding="5dp" &gt;
          &lt;HorizontalScrollView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:scrollbars="none"&gt;
              &lt;TabWidget
                  android:id="@android:id/tabs"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content" /&gt;
          &lt;/HorizontalScrollView&gt;
          &lt;FrameLayout
              android:id="@android:id/tabcontent"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:padding="5dp" /&gt;
      &lt;/LinearLayout&gt;
  &lt;/TabHost&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>styles.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  &lt;style name="CustomTheme" parent="@android:style/Theme"&gt;
      &lt;item name="android:tabWidgetStyle"&gt;@style/CustomTabWidget&lt;/item&gt;
  &lt;/style&gt;
  &lt;style name="CustomTabWidget" parent="@android:style/Widget.TabWidget"&gt;
      &lt;item name="android:textAppearance"&gt;@style/CustomTabWidgetText&lt;/item&gt;
  &lt;/style&gt;
  &lt;style name="CustomTabWidgetText" 
      parent="@android:style/TextAppearance.Widget.TabWidget"&gt;
      &lt;item name="android:textSize"&gt;10sp&lt;/item&gt;
      &lt;item name="android:textStyle"&gt;bold&lt;/item&gt;
      &lt;item name="android:textColor"&gt;#1589FF&lt;/item&gt;
      &lt;item name="android:padding"&gt;3dip&lt;/item&gt;
  &lt;/style&gt;
  
  
  &lt;/resources&gt;
  </code></pre>
  
  <p><strong>Activity</strong></p>
  
  <pre><code>public class InfralineTabWidget extends TabActivity{
  
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      Resources res = getResources(); // Resource object to get Drawables
      TabHost tabHost = (TabHost)getTabHost();  // The activity TabHost
  
      TabHost.TabSpec spec;  // Resusable TabSpec for each tab
      Intent intent;  // Reusable Intent for each tab
  
      // Create an Intent to launch an Activity for the tab (to be reused)
      intent = new Intent().setClass(this, TopNewsActivity.class);
  
      // Initialize a TabSpec for each tab and add it to the TabHost
      spec = tabHost.newTabSpec("topNews").setIndicator("Top News", res.getDrawable(R.drawable.tab_news)).setContent(intent);
      tabHost.addTab(spec);
  
      // Do the same for the other tabs
      intent = new Intent().setClass(this, PowerActivity.class);
      spec = tabHost.newTabSpec("power").setIndicator("Power", res.getDrawable(R.drawable.tab_power)).setContent(intent);
      tabHost.addTab(spec);
  
      intent = new Intent().setClass(this, EnergyActivity.class);
      spec = tabHost.newTabSpec("energy").setIndicator("Renewable Energy", res.getDrawable(R.drawable.tab_energy)).setContent(intent);
      tabHost.addTab(spec);
  
      intent = new Intent().setClass(this, CoalActivity.class);
      spec = tabHost.newTabSpec("coal").setIndicator("Coal", res.getDrawable(R.drawable.tab_coal)).setContent(intent);
      tabHost.addTab(spec);
  
      intent = new Intent().setClass(this, OilnGasActivity.class);
      spec = tabHost.newTabSpec("oilnGas").setIndicator("Oil &amp; Gas", res.getDrawable(R.drawable.tab_oilngas)).setContent(intent);
      tabHost.addTab(spec);
  
      tabHost.setCurrentTab(0);
      tabHost.getTabWidget().getChildAt(0).setLayoutParams(new LinearLayout.LayoutParams(100,25));
      tabHost.getTabWidget().getChildAt(1).setLayoutParams(new LinearLayout.LayoutParams(100,25));
      tabHost.getTabWidget().getChildAt(2).setLayoutParams(new LinearLayout.LayoutParams(100,25));
      tabHost.getTabWidget().getChildAt(3).setLayoutParams(new LinearLayout.LayoutParams(100,25));
      tabHost.getTabWidget().getChildAt(4).setLayoutParams(new LinearLayout.LayoutParams(100,25));
  
  
  
  }
  
  
  
  }
  </code></pre>
  
  <p>Now i want to remove the black spaces between the tabs and it should be like they are connected and also i'm not able to remove the grey line below the tabs.</p>
  
  <p>Thanks</p>