Reputation: 20936
I try to create resources like
res/values/styles.xml
<resources>
<style name="NotificationTitle">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
<item name="android:textStyle">bold</item>
</style>
<style name="NotificationText">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
</style>
</resources>
res/values-v9/styles.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="NotificationText" parent="android:TextAppearance.StatusBar.EventContent" />
<style name="NotificationTitle" parent="android:TextAppearance.StatusBar.EventContent.Title" />
</resources>
But for values-v9 I get this error:
error: Error retrieving parent for item: No resource found that matches the given name
'android:TextAppearance.StatusBar.EventContent.Title'.
Why?
Upvotes: 1
Views: 1739
Reputation: 124
Make sure you've set your target API (different from the target SDK) in the Project Properties (not the manifest) to be at least 2.3.3 (API 10).
Upvotes: 0
Reputation: 6206
I think it's caused by the error format of the parent attribute.
try
<style name="NotificationText" parent="@android:style/TextAppearance.StatusBar.EventContent" />
<style name="NotificationTitle" parent="@android:style/TextAppearance.StatusBar.EventContent.Title" />
Upvotes: 2