Title bar color change issues
<p>I want to change the color of the title bar dynamically, ie: someone clicks a button, it changes the color. However, I can't seem to get it to fill the entire title bar. This occurs on both the emulator and a Nexus One. Any ideas?</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/title_bar" android:background="@color/title_bar_blue" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt;
    &lt;TextView android:id="@+id/title_left_text" android:layout_alignParentLeft="true" style="?android:attr/windowTitleStyle" android:layout_width="wrap_content" android:layout_height="wrap_content"/&gt;
    &lt;TextView android:id="@+id/title_right_text" android:layout_alignParentRight="true" style="?android:attr/windowTitleStyle" android:layout_width="wrap_content" android:layout_height="wrap_content"/&gt;
&lt;/RelativeLayout&gt;
</code></pre>

<blockquote>
  <p></p>
</blockquote>

<pre><code>    requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
    setContentView(R.layout.main);
    getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title);

    titleBar = (RelativeLayout) findViewById(R.id.title_bar);
    titleBar.setBackgroundResource(R.color.title_bar_green);
</code></pre>

<p><img src="http://i.stack.imgur.com/sXb1f.png" alt="title bar"></p>
