setOnclickListener() on Button inside a ListView
<p>For each line of my listview i have a textView and 2 button, it work with the onItemclickListner but i want it with button </p>

<pre><code>final ArrayList&lt;String&gt; listvendeurtri = new ArrayList&lt;String&gt;();

Button b = (Button) findViewById(R.id.button1);
b.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v1) {
        Collections.sort(list, new comparatorprix());

        for (Vendeurs v : list) {
            listvendeurtri.add(v.getNom() + "  ---&gt;  "
                + v.getPrix() + "   dt");
        }

        final ListView listView = (ListView) findViewById(R.id.listView1);
        listView.setAdapter(new ArrayAdapter&lt;String&gt;(Main.this, R.layout.affiche, R.id.textView5,listvendeurtri));
</code></pre>

<p>In main.xml i have the listview and in affiche.xml i have textview and 2 button..</p>

<p>How can I make this work?</p>
