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 doe
Just as a workaround, Instead of using textAppearanceLarge
in the layout, (if you're using xml to build the layout), define your own textAppearanceLarge
style in the styles.xml that emulates the android default one except you can change the color to white.
xml layout:
<!-- example textview -->
<TextView style="@style/large" android:text="text goes here"></TextView>
then in the styles.xml
<style name="large">
<item name="android:textColor">@android:color/white</item>
<!-- other necessary items here like font etc.-->
</style>
The only difference between "style" and "theme" is the scope at which a style is applied at. A style applied to an Activity is called a Theme.
Here's a good writeup on the topic : http://brainflush.wordpress.com/2009/03/15/understanding-android-themes-and-styles/
Turns out I was barking up the wrong tree. Overriding the colors and everything worked just fine. However, by defining android:background
in my theme, everything just completely messed up, and all text appeared white, despite me overriding all colors (including textColorPrimary). Omitting android:background
did the trick.