Customizing Horizontal Progress bar of a Action-Bar

If you are thinking of overriding the Action-Bar horizontal progress-bar in your application, and you don’t have any idea how to do it then this blog might be useful.Here are the steps for overriding horizontal progress-bar.

First of all, Define theme for your application. In my case it looks like

 <style name="AppTheme" parent="Theme.Sherlock" />
     <style name="Theme.ESPN" parent="AppTheme">
     <item name="actionBarStyle">@style/ActionBar</item>

Secondly, you have to override the style for action-bar as horizontal progress-bar is a property of action-bar.

    <style name="ActionBar" parent="Widget.Sherlock.ActionBar">
        <item name="progressBarStyle">@style/ActionBarHorizontalProgressStyle</item>
        <item name="android:progressBarStyle">@style/ActionBarHorizontalProgressStyle</item></style>

Thirdly, override Widget.Sherlock.ProgressBar.Horizontal style for customizing Horizontal progressbar.

    <style name="ActionBarHorizontalProgressStyle" parent="Widget.Sherlock.ProgressBar.Horizontal">
        <item name="android:progressDrawable">@drawable/progress_horizontal_holo_light</item>
        <item name="android:minHeight">16dip</item>
        <item name="android:maxHeight">16dip</item>
Note: progress_horizontal_holo_light.xml can be obtained from android-holo-colors

After all those effort you can see customized white color horizontal progress-bar on top of action-bar.