how can we change the title text color of customactionbar in android? -
here styles.xml file. can please tell me how can change title text color of actionbar. default text been show black color.
styles.xml
<!-- base application theme, dependent on api level. theme replaced appbasetheme res/values-vxx/styles.xml on newer devices. --> <style name="appbasetheme" parent="android:theme.light"> <!-- theme customizations available in newer api levels can go in res/values-vxx/styles.xml, while customizations related backward-compatibility can go here. --> </style> <!-- application theme. --> <style name="apptheme" parent="appbasetheme"> <!-- customizations not specific particular api-level can go here. --> </style> <style name="myactionbar" parent="@style/widget.appcompat.light.actionbar.solid.inverse"> <item name="android:background" >@color/mycolor</item> <item name="background">@color/mycolor</item> </style> <style name="customactionbartheme" parent="@style/theme.appcompat.light"> <item name="android:actionbarstyle" >@style/myactionbar</item> <item name="actionbarstyle">@style/myactionbar</item> </style>
ok i've found better way. i'm able change color of title, can tweak subtitle.
here styles.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="mytheme" parent="@android:style/theme.holo.light"> <item name="android:actionbarstyle">@style/mytheme.actionbarstyle</item> </style> <style name="mytheme.actionbarstyle"parent="@android:style/widget.holo.light.actionbar"> <item name="android:titletextstyle">@style/mytheme.actionbar.titletextstyle</item> <style name="mytheme.actionbar.titletextstyle" parent="@android:style/textappearance.holo.widget.actionbar.title"> <item name="android:textcolor">@color/red</item> </resources>
Comments
Post a Comment