为了使该座标具有透明度,我已经实施了以下法典。
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)
造成这种情况的原因何在,如何解决这一问题。 请帮助。
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);
}
}
});
然而,这似乎对表格没有影响...... 页: 1