title: adding a pre-defined framelayout multiple times to a relativelayout
body: <p>I have a frame layout that consists of a edittext and button (to remove the field) that i want to add multiple times to a relative layout when a user clicks a button.</p>
  
  <p>I have searched but i just cant find how to do this programmatically.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" &gt;
  
      &lt;EditText
          android:id="@+id/inputbox"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_marginTop="20dp"
          android:textSize="25sp"
          android:textStyle="bold"
          android:hint="@string/inputhint"
          android:ems="10"
          android:imeOptions="actionNext"
          android:singleLine="true" /&gt;
  
      &lt;Button
          android:id="@+id/buttonremove"      
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginRight="10dp"
          android:layout_gravity="right|center_vertical"
          android:background="@drawable/remove" /&gt;
  
  &lt;/FrameLayout&gt;
  </code></pre>