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.