How to set Tab View Indicator background color in Android
<p>How to Change color on click tab Host. i can change image but color are not change.</p>

<pre><code>public class MainActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);

        TabHost tabHost=(TabHost)findViewById(R.id.tabHost);
        tabHost.setup();

        TabSpec spec1=tabHost.newTabSpec("Tab 1");
        spec1.setContent(R.id.tab1);`enter code here`
        spec1.setIndicator("Tab 1", getResources().getDrawable(setBackgroundColor(Color.RED));

        TabSpec spec2=tabHost.newTabSpec("Tab 2");
        spec2.setIndicator("Tab 2", getResources().getDrawable(setBackgroundColor(Color.GREAN));
        spec2.setContent(R.id.tab2);

        TabSpec spec3=tabHost.newTabSpec("Tab 3");
        spec3.setIndicator("Tab 3", getResources().getDrawable(setBackgroundColor(Color.BLACK));
        spec3.setContent(R.id.tab3);

        tabHost.addTab(spec1);
        tabHost.addTab(spec2);
        tabHost.addTab(spec3);
    }
}
</code></pre>
