1

I'm hoping someone can help. I am looking to change the indicator colour of my tab widget.

I had used the action bar tabs and had them styled correctly, however, I am using a nav drawer and require it to open over the tabs so I have changed to a tabhost/tabwidget.

I have followed this link: Customizing tab indicator images in android?

Here is the strange part, I can change the tab colour, the divider colour, but when I try to change the tabStripLeft and the tabStrip right it won't work. I also tried to remove the strip below the indicator but that wouldn't work

  android:background="@color/tab"
  android:divider="@color/appPink"
  android:tabStripLeft="@color/appPink"
  android:tabStripRight="@color/appPink"
  android:tabStripEnabled = "false"

I have tried drawables for the indicator too in case you may think this may be the problem. Does anyone have any ideas on this?

Here is how I've set them up in my activity:

        private FragmentTabHost mTabHost;

        mTabHost = (FragmentTabHost) findViewById(android.R.id.tabhost);
        mTabHost.setup(this, getSupportFragmentManager(), R.id.container);
        mTabHost.addTab(mTabHost.newTabSpec("home").setIndicator("Home"), PlaceholderFragment.class, null);
        mTabHost.addTab(mTabHost.newTabSpec("favourites").setIndicator("Settings"), settings_fragment.class, null);
        mTabHost.addTab(mTabHost.newTabSpec("settings").setIndicator("Favourites"), mark_list_fragment.class, null);

If anyone has any thoughts I'd appreciate hearing them.

Community
  • 1
  • 1
DJ-DOO
  • 4,545
  • 15
  • 58
  • 98
  • 3
    possible duplicate of [TabWidget current tab bottom line color](http://stackoverflow.com/questions/14722654/tabwidget-current-tab-bottom-line-color) – 2Dee Oct 04 '14 at 13:25
  • Did you read my answer? I state that I found my answer there...I asked that question in Feb?? – DJ-DOO Oct 05 '14 at 15:16
  • @DJ-DOO however it still is a duplicate. – Sufian Jun 03 '15 at 16:31

0 Answers0