Tab Divider issue
<p>I have an application where I have 5 tabs set up, and I it works perfectly except for one issue I noticed recently. On large screen sizes, for some reason, the tabs are transparent, I only noticed this when I tried out the application on one of my colleagues large android device. So I then set up the emulator to a large screen size of 10 inches, and its the same thing.</p>

<p>So in order to fix this, I used this code</p>

<pre><code>    public static void setTabColor(TabHost tabhost) {
    for (int i = 0; i &lt; tabhost.getTabWidget().getChildCount(); i++) {
        tabhost.getTabWidget().getChildAt(i)
                .setBackgroundColor(Color.parseColor("#292929")); // unselected
                                                                    // }
        tabhost.getTabWidget().getChildAt(tabhost.getCurrentTab())
                .setBackgroundColor(Color.parseColor("#8b8b8b")); // selected
    }
}
</code></pre>

<p>Then I use OnTabChangeListener and place</p>

<pre><code>setTabColor(tabHost);
</code></pre>

<p>under each tab change. This fixed the issue so that the tab colours are the same for all screen sizes. However the problem now is that the divider is gone. I tried using</p>

<pre><code>tabHost.getTabWidget().setDividerDrawable(R.drawable.separator);
</code></pre>

<p>but the problem is this piece of code must be called before you set the content of the tabs and seeing I have set up</p>

<pre><code>setTabColor(tabHost);
</code></pre>

<p>on every tab change, it makes it rather useless as it works when application loads up, but when you switch tab, it is gone again, and I can't call it again otherwise application will crash.</p>

<p>Does anyone have any suggestions as to how I can fix this issue? And also could someone explain to me why the tabs are transparent on larger screens? Why does Android do this?</p>

<p>Thanks in advance for any assistance</p>
