0

I would like to change the background of the tabwidget in shown in the next image:

enter image description here

I would like to use a different background color, and change the font color to the selected tab. How can I do that?

Sterling Diaz
  • 3,789
  • 2
  • 31
  • 35

2 Answers2

0

you can google for the tables available for different colors this is a chart or table available with color and the code to get that color

just choose which ever you like

Tajamul
  • 31
  • 2
  • 1
    ... He wants to know how to *change* the color, not how to find a color to use. – Cat Dec 06 '12 at 02:07
0

To do this i used drawables for tab widgets instead of fixed images. my code is

tab1.setImageDrawable(getResources().getDrawable(R.drawable.tab_drawable));

in the tab_drawable is a simple selector defining the behavior of the drawable for different state. you can try that it is very useful.

stinepike
  • 54,068
  • 14
  • 92
  • 112