title: Need to add layout dynamically
body: <p>This is my Layout , I have nested Linear layout inside another linear layout which is nested inside an Scroll view. Now i want to add an Linear layout dynamically (I may even add upto 10) inside <code>android:id="@+id/formLayout"</code> i.e beneth <code>android:id="@+id/secondLayout"</code></p>
  
  <p>Original Layout : </p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
      &lt;ScrollView
          android:layout_width="match_parent"
          android:layout_height="420dp"
          android:layout_alignParentLeft="true"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true"&gt;
          &lt;!-- LinearLayout Inside ScrollView --&gt;
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:id="@+id/formLayout"
              android:orientation="vertical"&gt;
              &lt;!-- Serial Layout --&gt;
              &lt;LinearLayout
                  android:id="@+id/secondLayout"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="20dp"
                  android:orientation="horizontal"
                  android:weightSum="2"&gt;
                  &lt;android.support.design.widget.TextInputLayout
                      android:id="@+id/serialno_label"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:layout_marginLeft="10dp"
                      android:layout_marginStart="10dp"
                      android:paddingEnd="10dp"
                      android:paddingLeft="10dp"
                      android:paddingStart="10dp"&gt;
                      &lt;AutoCompleteTextView
                          android:id="@+id/fieldSerial"
                          android:layout_width="fill_parent"
                          android:layout_height="fill_parent"
                          android:hint="@string/txt_sno_text"
                          android:singleLine="true"
                          android:textIsSelectable="false"
                          android:textSize="15sp" /&gt;
                  &lt;/android.support.design.widget.TextInputLayout&gt;
              &lt;/LinearLayout&gt;
          &lt;/LinearLayout&gt;
      &lt;/ScrollView&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Dynamic Layout needs to be added : </p>
  
  <pre><code>&lt;LinearLayout
      android:id="@+id/sixthLayout"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginTop="20dp"
      android:orientation="horizontal"
  android:weightSum="2"&gt;
  
  &lt;android.support.design.widget.TextInputLayout
      android:id="@+id/attr2_label"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginLeft="10dp"
      android:layout_marginStart="10dp"
      android:paddingEnd="10dp"
      android:paddingLeft="10dp"
      android:paddingStart="10dp"&gt;
  
      &lt;EditText
          android:id="@+id/fieldAttr2"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:hint="Attribute 2"
          android:textSize="15sp" /&gt;
  &lt;/android.support.design.widget.TextInputLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Can some one help me with this ?</p>