I'm changing the theme of an activity in onCreate using setTheme (I'm doing that even before calling super.onCreate(), as this is supposed to be more reliable).
It does work in the sense that it changes the background and foreground colors. However, my layout has a few elements that use styles like textAppearanceLarge. Now Android's textAppearanceLarge internally uses the textPrimaryColor - which is still unchanged by my theme.
I tried to override the primary text color in my theme, but that doesn't seem to work.
Here is the crucial part of the theme:
<style name="Theme.MyApp.White">
<item name="android:background">@android:color/white</item>
<item name="android:textColor">#000000</item>
</style>
The background appears white, plain TextViews appear black... but TextViews using textAppearanceLarge are white, and as such invisible (white on white).
I tried things like this:
<item name="android:ColorPrimary">#000000</item>
<item name="android:textColorPrimary">#000000</item>
<item name="android:attr/textColorPrimary">#000000</item>
But none of those do anything. What's the magic trick?