title: Android ICS displaying tabactivity tabs wrong
body: <p>I have an application using TabActivity but it is being rendered incorrectly on ICS. Not really interested in ActionBar or Fragments as a solution since the tabs still otherwise work for my and others applications.</p>
  
  <p>Here is what it looks like on all other versions of android (the desired look)
  <a href="https://i.stack.imgur.com/UK1Vp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UK1Vp.png" alt=""></a>
  </p>
  
  <p>and here is what it looks like on ICS, incorrect.</p>
  
  <p><a href="https://i.stack.imgur.com/5ArWd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5ArWd.png" alt=""></a>
  </p>
  
  <p>here is my tabactivity tab code, what needs to change?</p>
  
  <pre><code>    intent = new Intent().setClass(this, HomeMenuGroup.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
      spec = tabHost.newTabSpec("homeMenuGroup").setIndicator(li.inflate(R.layout.main_tabs_home, tabHost.getTabContentView(), false))
              .setContent(intent);
      tabHost.addTab(spec);
  
      // Do the same for the other tabs
      intent = new Intent().setClass(this, BuyTicketsGroup.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
      spec = tabHost.newTabSpec("buyTicketsGroup").setIndicator(li.inflate(R.layout.main_tabs_buy, tabHost.getTabContentView(), false))
              .setContent(intent);
      tabHost.addTab(spec);
  
      intent = new Intent().setClass(this, UseTicketsGroup.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
      spec = tabHost.newTabSpec("useTicketsGroup").setIndicator(li.inflate(R.layout.main_tabs_use, tabHost.getTabContentView(), false))
              .setContent(intent);
      tabHost.addTab(spec);
  
      intent = new Intent().setClass(this, MyAccountGroup.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
      spec = tabHost.newTabSpec("myAccountGroup").setIndicator(li.inflate(R.layout.main_tabs_account, tabHost.getTabContentView(), false))
              .setContent(intent);
      tabHost.addTab(spec);
  </code></pre>
  
  <p>and here is one of my tab button layout xml <code>R.layout.main_tabs_account</code> </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="wrap_content" android:layout_height="wrap_content"&gt;
  &lt;TextView android:background="@drawable/switcher_account"
        android:layout_width="80dip"
        android:layout_height="60dip"/&gt;
   &lt;/LinearLayout&gt;
  </code></pre>