[android] Change action bar color in android

I am using the app theme Theme.Black in my app. In this theme the action bar is gray. How I can change color of my action bar? This is my attempt:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">

    <style name="mytheme" parent="@android:style/Theme.Black" >

    <style name="Widget.MyApp.ActionBar" parent="@android:style/Widget.ActionBar">
        <item name="android:background">@android:color/black</item>


However, it doesn't work. Any ideas?

This question is related to android android-layout

The answer is

ActionBar bar = getActionBar();
bar.setBackgroundDrawable(new ColorDrawable("COLOR")); 

it worked for me here

Similar questions with android tag:

Similar questions with android-layout tag: