Type error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Sherlock.Light'

<style name="android:style/Theme.Transparent" parent="@android:style/Theme.Sherlock.Light">
    <item name="android:windowIsTranslucent">true</item>
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:backgroundDimEnabled">false</item>
</style>

Im getting the error that written at the topic and I don't understand why. The min sdk is defined as 13. Please HELP!

Upvotes: 0

Views: 743

Answers (1)

Blo
Blo

Reputation: 11978

Use the Sherlock parent style, which is defined by @style/, and not this one that you have from android library, which is called by @android:style (same for color, drawable, etc), as follows:

<style ... parent="@style/Theme.Sherlock.Light">  

Sometimes, this above will not work. Another solution is to call the parent without @style/ prefix as:

<style ... parent="Theme.Sherlock.Light">  

Then, when you call your custom style, it might be better to use a name like this:

<style name="ThemeTransparent" ... >  

which will be attached to the application (or an activity) in the manifest file with:

<application
    ...
    android:theme="@style/ThemeTransparent" >

Upvotes: 3

Related Questions