1

When I create tabs using FragmentTabHost it created tabs with white bachground and yellow indicator below selected tab. When I click on any tab there is an animation that looks like a yellow wave spreading around the surface of a selected tab. Unselected tab's text is gray, while selected tab's text becomes black.

tabs:

enter image description here

Since tab is clicked:

enter image description here

I would like to save this animation but only change the colors because its hard to see where the borders star/end and take out the yellow bottom indicator. How can I do that?

I have tried code below and using styles, but all of the material I have found canceled the animation too.

for (int i=0; i<mFragmentTabHost.getTabWidget().getTabCount(); i++) {
                mFragmentTabHost.getTabWidget().getChildTabViewAt(i).setBackgroundColor(Color.parseColor("#7392B5"));
            }
            mFragmentTabHost.getTabWidget().getChildTabViewAt(mFragmentTabHost.getCurrentTab()).setBackgroundColor(Color.parseColor("#4E4E9C"));
Marat
  • 6,142
  • 6
  • 39
  • 67

1 Answers1

0

Have you tried changing your colorPrimary/colorSecondary values in the file res/values/color.xml ?

Example :

<?xml version="1.0" encoding="utf-8"?>
    <resources>
        <color name="colorPrimary">#f44336</color>
        <color name="colorSecondary">#2f76b6</color>
    </resources>
Jack'
  • 1,722
  • 1
  • 19
  • 27
  • I think it does depend on these color names. At least I have colorPrimary already specified and it does not match with the one in screenshot – Marat Jun 20 '16 at 12:26