Details:
I\'m extending ActionBarActivity.
Eclipse and SDK fully patched as of 2011-11-06.
See the Android Official Documentation for reference
I am building an app with minSdkVersion = "9"
and targetSdkVersion = "21"
I changed the color of action bar and it works fine with API level 9
Here is an xml
res/values/themes.xml
and set the color of actionbar you want
res/values/colors.xml
#fff //write the color you want here
Actionbar color can also be defined in .class
file, the snippet is
ActionBar bar = getActionBar();
bar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#0000ff")));
but this will not work with the API < 11, so styling the actionbar in xml
is only way for API < 11