1

I want to change the color of bottom of a tabview ( Its is blue by default but I want to change it to red ).

I have put an image of my application : this is the image

And by the way I'm not using android support in my application

  • Possible duplicate of [How to change the new TabLayout indicator color and height](http://stackoverflow.com/questions/30904138/how-to-change-the-new-tablayout-indicator-color-and-height) – Daniel Nugent Nov 09 '15 at 07:44
  • No mine is different if u look at the source –  Nov 09 '15 at 13:09

1 Answers1

0
public static void setTabColor(TabHost tabhost) {
    for(int i=0;i<tabhost.getTabWidget().getChildCount();i++)

   {tabhost.getTabWidget().getChildAt(i).setBackgroundResource(R.color.white);}   tabhost.getTabWidget().getChildAt(tabhost.getCurrentTab()).setBackgroundResource(R.color.tab_selected);}
Nisarg
  • 1,358
  • 14
  • 30
  • I haven't implemented the menu with TabHost I have used a framelayout and fragement –  Nov 09 '15 at 07:04
  • Download it from here : http://s000.tinyupload.com/?file_id=01306559512437422437 –  Nov 09 '15 at 07:29
  • try this http://blog.alwold.com/2013/08/28/styling-tabs-in-the-android-action-bar/ – Nisarg Nov 09 '15 at 08:35