To make the tabhost transparent i have implemented the following code..
for(int i = 0; i < th.getTabWidget().getTabCount(); i++)
{
th.getTabWidget().getChildAt(i).setBackgroundColor(Color.TRANSPARENT);
}
This changes the background of all the tabs to transparent successfully in ICS but when I test it on 2.2 and 2.3 the first 3 tabs backgrounds are transparent and the last 3 are not(I have 6 tabs in all)(incidentally the 1st 3 tabs are the ones that appear when that activity gets started)
What is causing this and how can i resolve it... Please help..
After applying your suggestion this is what i included in the code,
th.setOnTabChangedListener(new OnTabChangeListener(){
@Override
public void onTabChanged(String tabId) {
manageTabBackgrounds();
}
private void manageTabBackgrounds() {
// TODO Auto-generated method stub
for(int i = 0; i < th.getTabWidget().getTabCount(); i++)
{
th.getTabWidget().getChildAt(i).setBackgroundColor(Color.TRANSPARENT);
}
}
});
However this seems to have had no effect on the tabs... Please guide..