Pergunta

I am developing Android 2.1 API 7 app. To implement action bar, I am using ActionbarSherlock library.

I have successfully imported sherlock library to my project, and created the action bar in my app. Then, I would like to customize the style of sherlock action bar. So, I defined the following style file:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="ActionBarTheme" parent="android:style/Theme.Sherlock">
        <item name="android:background">@drawable/action_bar_background</item>
    </style>
</resources>

But I got error :

No resource found that matches the given name "android:style/Theme.Sherlock"

Why? and how can I style sherlock Action bar ??

Foi útil?

Solução

Theme.Sherlock is not in the Android namespace. Simply remove the android: prefix and that will resolve your error.

If you're using version 3, there is a styled sample in the samples/ folder which gives you an example of how to properly style the action bar:

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top