Android : Buttons and edit Text repeated in listView
<p>My problem is that my listView repeat all items of my layout. 
I need to have the edit text and the button at the bottom of this listView.
But here the edit text and button is repeated for each row of listView and i don't know why.
If someone could help me
The activity :</p>

<pre><code>public class MessActivity extends ListActivity
{
    public Channel chan;
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setListAdapter(Network.getInstance().Messages);
        Bundle b = getIntent().getExtras();
        this.chan = (Channel) b.get("chanSelected");
        //add all message of selected chan to the messAdapter
        for (int i = 0 ; i &lt; this.chan.getListMessage().size() ; i++) {
            Message mess = this.chan.getListMessage().get(i);
            Network.getInstance().addMessage(mess);
        }
        setContentView(R.layout.mess_list);
    }
}
</code></pre>

<p>The adapter :</p>

<pre><code>public class MessageAdapter extends ArrayAdapter&lt;Message&gt;
{
    private Context context;
    private int textViewResourceId;

    public MessageAdapter(Context context, int textViewResourceId)
    {
        super(context, textViewResourceId);
        this.context = context;
        this.textViewResourceId = textViewResourceId;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent)
    {
        View row = convertView;
        MessHolder holder = null;
        //row null
        if(row == null)
        {
            LayoutInflater inflater = ((Activity)context).getLayoutInflater();
            row = inflater.inflate(textViewResourceId, parent, false);

            holder = new MessHolder();
            holder.texte = (TextView)row.findViewById(R.id.listMess);

            row.setTag(holder);
        }
        else
        {
            holder = (MessHolder)row.getTag();
        }

        Message mess = getItem(position);
        holder.texte.setText(mess.getText());

        return row;
    }

    static class MessHolder
    {
        TextView texte;
    }
}
</code></pre>

<p>The layout :</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="wrap_content"
    android:orientation="vertical" &gt;
    &lt;ListView 
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="1" 
          android:id="@android:id/list"&gt;
   &lt;/ListView&gt;

           &lt;TextView

            android:id="@+id/listMess"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_gravity="center"
            android:padding="10dp"
            android:textSize="16sp" &gt;

        &lt;/TextView&gt;

    &lt;LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_gravity="bottom" &gt;


        //edittext
        &lt;EditText
            android:id="@+id/editText1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:ems="10"
            android:inputType="text" /&gt;




        &lt;Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_weight="1"
            android:text="Envoyer" /&gt;

    &lt;/LinearLayout&gt;

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

<p>Thank you for your help.</p>
