How do I populate the contents from EditText in ListView?
<p>I have a layout file in which I have defined a <code>ListView</code> and another layout file in which I have defined the style of the individual list element. <code>OnClick</code> how do I populate my <code>ListView</code> by using the other layout? Or is it even possible to do so?</p>

<p>This is my ListView</p>

<pre><code>&lt;ListView
    android:id="@+id/chat_list"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="80dp"
    &gt;
&lt;/ListView&gt;

&lt;RelativeLayout
    android:id="@+id/form"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:orientation="vertical"&gt;

&lt;/RelativeLayout&gt;

&lt;EditText
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:inputType="textMultiLine"
    android:ems="10"
    android:id="@+id/chat"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_toLeftOf="@+id/send_button"/&gt;

&lt;Button
    android:layout_width="80dp"
    android:layout_height="80dp"
    android:background="@drawable/icons_chat"
    android:height="20dp"
    android:width="20dp"
    android:id="@+id/send_button"
    android:onClick="sendChat"
    android:layout_alignBottom="@+id/chat"
    android:layout_alignParentRight="true"
    /&gt;
</code></pre>

<p>This is my other layout</p>

<pre><code>&lt;EditText
    android:id="@+id/user_title"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" /&gt;
&lt;EditText
    android:id="@+id/chat_message"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" /&gt;
</code></pre>

<p><code>OnClick</code> I want to <code>getText</code> from the <code>EditText</code> in the first layout and update the <code>ListView</code> using the style in the second layout. How can I do that?</p>