title: Replace `layout` of an <include/> tag programmatically for Android
body: <p>I want to change the <code>layout</code> of my <code>&lt;include/&gt;</code> tag dynamically/programmatically.</p>
  
  <p>I have a main <code>layout</code> that I want to re-use but the contents should change dynamically.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/swipe_container"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="@color/white_background"
      android:orientation="vertical" &gt;
      &lt;include
          android:id="@+id/main_container"
          layout="REPLACE_THIS" /&gt;
  &lt;/android.support.v4.widget.SwipeRefreshLayout&gt; 
  </code></pre>
  
  <p>Above is the xml that I am using, I am assuming that you will need to find the id of the include and then change it programmatically. </p>
  
  <p>Thanks in advance.</p>