I want to apply custom themes to my tab layout but I can't get it to work, a couple stipulations I have are :
It mustn't be programmatic, I want to be able call setTheme at the very beginning of my activity or fragment and not have to do any other work
The theme must be setup in themes and be changeable as I have 6 themes, some of these are light and some are dark
WHAT I'M CURRENTLY TRYING
What I've been trying to do is set up a theme in my styles.xml file and then have smaller themes set up for different widgets that i can register in my main style, like a parent sibling relationship, so here is my blue theme/style (parent)
<style name="MyAppBlueTheme" parent="Theme.AppCompat">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/primary_blue</item>
<item name="colorPrimaryDark">@color/primary_dark_blue</item>
<item name="colorAccent">@color/accent_blue</item>
<item name="android:textColor">@color/primary_text_blue</item>
<item name="android:colorBackground">@color/background_light</item>
<item name="android:tabWidgetStyle">@style/Blue.TabLayout</item>
</style>
Here I declare tabWidgetStyle as Blue.TabLayout as a sort of sibling, here is what that tab layout style looks like (sibling)
<style name="Blue.TabLayout" parent="Base.Widget.Design.TabLayout">
<item name="tabSelectedTextColor">@color/selected_textBlue</item>
<item name="tabIndicatorColor">@color/accent_blue</item>
<item name="tabBackground">@color/primary_blue</item>
</style>
And this has its own sibling for the text
<style name="CustomTabTexStyleBlue" parent="TextAppearance.Design.Tab">
<item name="android:textColor">@color/primary_text_blue</item>
</style>
I set the theme by using setTheme at the beginning of my activity or fragment and everything else looks fine except my tab layout which appears transparent, can anyone give me some insight into whats going on here please