android - white theme not showing the text -
i making app (android 1.6) can change between 2 different themes. made custom theme takes android light theme parent! trouble when switch white theme text not drawn if select can see text. furthermore when switch themes titletext, previous , next same in dark theme.
here code use theme:
<style name="theme.white" parent="android:theme.light"> <item name="android:colorbackground">@color/text_color_dark</item> <item name="android:textcolor">@color/text_color_dark</item> <item name="textprev">@style/text_prev</item> <item name="textregular">@style/text_regular</item> <item name="texttitle">@style/text_title</item> <item name="textnext">@style/text_next</item> <item name="pageback">@style/page_back</item> <item name="whiteback">@style/white_back</item> <item name="android:textcolorprimaryinverse">@android:color/primary_text_light</item> </style> </resources> this style:
<style name="text_prev"> <item name="android:textcolor">@color/text_color</item> </style> <style name="text_next"> <item name="android:textcolor">@color/default_text_color_2</item> </style> <style name="text_regular"> <item name="android:textcolor">@color/text_color_dark</item> </style> <style name="text_title"> <item name="android:textcolor">@color/text_color_dark</item> </style> <style name="page_back"> <item name="android:background">@drawable/white_background</item> </style> <style name="white_back"> <item name="android:background">@drawable/white_container</item> <item name="android:padding">10sp</item> </style> i use 2 more resources in res/drawable folder. works fine in standard theme, switch light theme text disappears. there i'm doing wrong?
from code snippet above you're setting both background , text same color i.e. "color/text_color_dark", these should different.
<item name="android:colorbackground">@color/text_color_dark</item> <item name="android:textcolor">@color/text_color_dark</item>
Comments
Post a Comment