Adding a layout dynamically into a Scrollview
<p>This question seems to have been asked a dozen times already bu I haven't been able to deduce the solution from them.</p>

<p>I have a layout called <code>tile.xml</code> that looks like this:</p>

<p></p>

<pre><code>&lt;TextView
    android:id="@+id/textView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginLeft="50dp"
    android:layout_marginTop="10dp"
    android:text="May Fong Robinson"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:textStyle="bold" /&gt;

&lt;TextView
    android:id="@+id/textView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginLeft="50dp"
    android:layout_marginTop="10dp"
    android:text="Beautiful star-shaped spillway, Kechut Reservoir, Jermuk, Armenia"
    android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
</code></pre>

<p></p>

<p>I need to add this one of my views called <code>feed.xml</code> which I've declared as a <code>ScrollView</code> because I want to have multiple objects in it so I can vertically scroll though them. Here's my <code>feed.xml</code> file:</p>

<pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/scrollView1"
    android:layout_width="fill_parent"
    android:background="#F1F1F1"
    android:layout_height="fill_parent" &gt;

&lt;/ScrollView&gt;
</code></pre>

<p>I'd like to dynamically add my "tile" from <code>tile.xml</code> to my "feed" <code>feed.xml</code> view while changing the text of the <code>TextViews</code> on the fly.</p>

<p>How can I do this? Thanks</p>

<hr>

<p>The new <code>feed.xml</code>:</p>

<pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#F1F1F1" &gt;

    &lt;LinearLayout
        android:id="@+id/tiles"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" &gt;
    &lt;/LinearLayout&gt;

&lt;/ScrollView&gt;
</code></pre>

<p>...and the new <code>tile.xml</code>:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_marginLeft="10dp"
    android:layout_marginRight="10dp"
    android:layout_marginTop="10dp"
    android:background="#FFFFFF"
    android:orientation="vertical" &gt;

    &lt;TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="50dp"
        android:layout_marginTop="10dp"
        android:text="May Fong Robinson"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textStyle="bold" /&gt;

    &lt;TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="50dp"
        android:layout_marginTop="10dp"
        android:text="Beautiful star-shaped spillway, Kechut Reservoir, Jermuk, Armenia"
        android:textAppearance="?android:attr/textAppearanceMedium" /&gt;

&lt;/LinearLayout&gt;
</code></pre>
