I\'ve a TabHost like this:
For me @Farhan 's solution did not work since getChildCount() kept returning 1 while having four tabs. Using getTabCount() and getChildTabViewAt() solved it for me:
for (int tabIndex = 0 ; tabIndex < mTabHost.getTabWidget().getTabCount() ; tabIndex ++) {
View tab = mTabHost.getTabWidget().getChildTabViewAt(tabIndex);
TextView t = (TextView)tab.findViewById(android.R.id.title);
t.setTextColor(getResources().getColor(R.color.white));
}
I'd thought I post this alternative for people having the same issue.