Search code examples
androidandroid-actionbaractionbarsherlock

How do I get the default background color in ActionBarSherlock?


I am using the ActionBar from the ActionBarSherlock library. I am able to set the background color of my action bar using the ActionBar.setBackgroundDrawable(Color) method. After changing the background color, I later need to revert it back to the original/default ActionBar color.

How can I determine what the original/default color used for the ActionBar was?


Solution

  • Depends on the theme you are using. It should be

    • R.drawable.abs__ab_transparent_dark_holo for Theme.Sherlock
    • R.drawable.abs__ab_solid_light_holo for Theme.Sherlock.Light
    • R.drawable.abs__ab_solid_dark_holo for Theme.Sherlock.Light.DarkActionBar