title: setBackgroundColor(int color) and RelativeLayout
body: <p>When i used this XML file...</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/RelativeLayout1"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="#FF0000"
  
  tools:context=".MainActivity" &gt;
  
  &lt;TextView
      android:id="@+id/textView1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"        
      android:text="@string/hello_world" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>..I see that background color wrap content</p>
  
  <p><a href="http://img716.imageshack.us/img716/8225/rlayout.jpg" rel="nofollow">http://img716.imageshack.us/img716/8225/rlayout.jpg</a></p>
  
  <p>But if i write this RelativeLayout by code...</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      RelativeLayout layout = new RelativeLayout(this);
  
      RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(
              RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
  
  
      layout.setBackgroundColor(Color.parseColor("#FF0000"));
  
      TextView text = new TextView(this);
      text.setText("Hello world");
  
      //Añado texto
      layout.addView(text);
  
      layout.setLayoutParams(params);
  
      setContentView(layout); 
  }
  </code></pre>
  
  <p>...I see that background color match parent instead of wrap content</p>
  
  <p><a href="http://img404.imageshack.us/img404/1427/rlayoutfull.jpg" rel="nofollow">http://img404.imageshack.us/img404/1427/rlayoutfull.jpg</a></p>
  
  <p>Any ideas?</p>
  
  <p>Thanks!</p>