TabWidget tw = getTabWidget();
for (int i = 0; i < tw.getChildCount(); i++) {
View v = tw.getChildAt(i);
v.setBackgroundColor(Color.parseColor("#666666"));
}
tw.getChildAt(0).setBackgroundColor(Color.parseColor("#B21206"));
There are two tabs in my activity. This code keeps the color of the first tab fixed to "RED" but does not make the second tab change to "RED" when clicked. what changes should be done in the code?