Showing posts with label ActionBarSherlock. Show all posts
Showing posts with label ActionBarSherlock. Show all posts

Monday, August 13, 2012

Theming the ActionBarSherlock in Android


If you want to customize your ActionBarSherlock follow this steps:

1. Create in values folder a new file style.xml

2. In style.xml file determine your styles you want for ActionBarSherlock e.g. :
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
    <style name="Theme.Styled" parent="Theme.Sherlock.Light.DarkActionBar">
    <item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>
    <item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item>
</style>

<style name="Widget.Styled.ActionBar" parent="Widget.Sherlock.Light.ActionBar.Solid.Inverse">
    <item name="background">@drawable/bgraund</item>
    <!-- <item name="android:background">@drawable/top_bar</item> -->
    <item name="backgroundSplit">@drawable/bgraund</item>
    <item name="android:background">@drawable/bgraund</item>
</style>
</resources>


3. In your AndroidManifest.xml determine this your custom style that you just created in style.xml:
<application android:icon="@drawable/adsurfer_icon" 
        android:label="@string/app_name"
        android:debuggable="true"
        android:name=".app.AdsurferApplication"
        android:theme="@style/Theme.Styled" >


I've found helpful info on this topic in this article: