I am implementing ActionBar to set the color for text using this style script in xml but getting error when I run my application time does anybody have idea what I have missing
this is my style.xml file
<!-- Start with the Holographic Light theme --> <style name="Theme.IOSched" parent="android:style/Theme.Holo.Light"> <item name="android:windowBackground">@drawable/window_background</item> <item name="android:actionBarStyle">@style/ActionBar</item> <!-- custom attributes <item name="textHeaderMaxLines">@integer/text_header_max_lines</item> <item name="trackAbstractMaxLines">@integer/track_abstract_max_lines</item>--> </style> <style name="Theme.IOSched.Home" parent="style/Theme.IOSched"> <item name="android:windowBackground">@drawable/window_background_home</item> <item name="android:actionBarStyle">@style/ActionBar</item> </style> <style name="ActionBar" parent="android:style/Widget.Holo.Light.ActionBar"> <item name="android:background">@color/actionbar_background</item> <item name="android:textColor">@color/accent_1</item> <item name="android:titleTextStyle">@style/ActionBarText</item> </style> <style name="ActionBarText" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title"> <!-- getting here error--> <item name="android:textColor">@color/accent_1</item> <item name="android:textStyle">bold</item> </style> error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Widget.ActionBar.Title'.
TextAppearance.Holo.Widget.ActionBar.Title
appears to have been added in API Level 13. Make sure your build target is set to 13, not just 11.
AndroidManifest.xml:
<uses-sdk android:minSdkVersion=... android:targetSdkVersion="11" />
and
Project Properties -> Project Build Target = 11 or above
These 2 things fixed the problem for me!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With