title: This RelativeLayout layout or its LinearLayout parent is useless
body: <p>I'm developing an Android 3.1. and above application.</p>
  
  <p>On one activity I generate its layout dynamically. I'm using <strong>formdetail.xml</strong> as contentview:</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState)
  {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.formdetail);
  
      Bundle extras = getIntent().getExtras();
      if (extras != null)
      {
          currentFormId = extras.getString("FormId");
      }
  }
  </code></pre>
  
  <p>formdetail.xml :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/detailLayout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;RelativeLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content" &gt;
          &lt;Button
              android:id="@+id/downloadFormsButton"
              android:enabled="false"
              android:layout_alignParentLeft="true"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_margin="10dp"
              android:text="@string/download_forms_button" /&gt;
          &lt;TextView
              android:id="@+id/formErrorMsg"
              android:layout_alignParentRight="true"
              android:layout_alignParentBottom="true"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:padding="10dp"
              android:textSize="16dp" &gt;
          &lt;/TextView&gt;
      &lt;/RelativeLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><code>downloadFormsButton</code> and <code>formErrorMsg</code> must be always in form.</p>
  
  <p>But using that xml I get this warning:</p>
  
  <p><code>This RelativeLayout layout or its LinearLayout parent is useless</code></p>
  
  <p>I need linearLayout to add TableLayouts programmatically.</p>
  
  <p>How can I solve this warning?</p>