title: Updating Android Tab Icons
body: <p>I have an activity that has a TabHost containing a set of TabSpecs each with a listview containing the items to be displayed by the tab. When each TabSpec is created, I set an icon to be displayed in the tab header.</p>
  <p>The TabSpecs are created in this way within a <code>setupTabs()</code> method which loops to create the appropriate number of tabs:</p>
  <pre><code>TabSpec ts = mTabs.newTabSpec(&quot;tab&quot;);
  ts.setIndicator(&quot;TabTitle&quot;, iconResource);
  
  ts.setContent(new TabHost.TabContentFactory(
  {
      public View createTabContent(String tag)
      {
          ... 
      }            
  });
  mTabs.addTab(ts);
  </code></pre>
  <p>There are a couple of instances where I want to be able to change the icon which is displayed in each tab during the execution of my program. Currently, I am deleting all the tabs, and calling the above code again to re-create them.</p>
  <pre><code>mTabs.getTabWidget().removeAllViews();
  mTabs.clearAllTabs(true);
  setupTabs();
  </code></pre>
  <p>Is there a way to replace the icon that is being displayed without deleting and re-creating all of the tabs?</p>