title: Android: Tabstyle
body: <p>I have been trying to make a tabstyle that looks like this. But so far it doesn't work
  Can someone help me with this.. </p>
  
  <p><a href="http://www.technobuzz.net/wp-content/uploads/2010/02/seesmic-android-260-208.png" rel="nofollow">http://www.technobuzz.net/wp-content/uploads/2010/02/seesmic-android-260-208.png</a></p>
  
  <p>The style shows only the colors When selected. When I use a white icon is the text (text setindicator) white. This also applies to the gray icon.</p>
  
  <p>When the icon color is white the text from the setindicator is then also white.. How can I fix this.</p>
  
  <p>Thanks in advance! </p>
  
  <p><strong>Main.java</strong></p>
  
  <pre><code>intent = new Intent().setClass(this, Settings.class);
           spec = tabHost.newTabSpec("settings").setIndicator("Settings",
                  res.getDrawable(R.drawable.tab_settings))
                  .setContent(intent);
                  tabHost.addTab(spec);
  
  
                  TabWidget tw = getTabWidget(); 
                  for (int i = 0; i &lt; tw.getChildCount(); i++) { 
                          View v = tw.getChildAt(i); 
                          v.setBackgroundDrawable(getResources().getDrawable 
                          (R.drawable.custom_tab)); 
                  } 
  </code></pre>
  
  <p><strong>tab_settings</strong></p>
  
  <pre><code>  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;!-- PRESSED TAB --&gt;
      &lt;item 
          android:state_pressed="true"
          android:drawable="@drawable/artists_on"
          android:color="#bfbfbf"
          /&gt;
      &lt;!-- INACTIVE TABS --&gt;
      &lt;item 
          android:state_selected="false"
          android:state_focused="false"
          android:state_pressed="false"
          android:drawable="@drawable/artists_of"
          /&gt;
      &lt;!-- ACTIVE TAB --&gt;
      &lt;item 
          android:state_selected="true"
          android:state_focused="false"
          android:state_pressed="false"
          android:drawable="@drawable/artists_of"
          /&gt;
      &lt;!-- SELECTED TAB --&gt;
      &lt;item 
          android:state_focused="true"
          android:state_selected="true"
          android:state_pressed="false"
          android:drawable="@drawable/artists_on"
          /&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>custom_tab.xml the tab style...</strong></p>
  
  <pre><code>&lt;item android:state_pressed="true" &gt;
      &lt;shape&gt;
          &lt;gradient
              android:startColor="#ea9d32"
              android:endColor="#ffcc50"
              android:angle="270" /&gt;
      &lt;/shape&gt;
  &lt;/item&gt;
  
  &lt;!-- WHEN SELECTED --&gt; &lt;!-- HOW CAN I SAID WHEN NOT SELECTED? --&gt; 
      &lt;item android:state_focused="true" &gt;
          &lt;shape&gt;
              &lt;gradient
                  android:endColor="#ffcc50"
                  android:startColor="#ffcc50"
                  android:angle="270" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  
         &lt;item android:state_focused="false" &gt;
          &lt;shape&gt;
              &lt;gradient
                  android:endColor="#ffffff"
                  android:startColor="#AAAAAA"
                  android:angle="270" /&gt;
              &lt;stroke
                  android:width="1px"
                  android:color="#000000" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  &lt;/selector&gt;
  </code></pre>