For each line of my listview i have a textView and 2 button, it work with the onItemclickListner but i want it with button
final ArrayList<String> listvendeurtri = new ArrayList<String>();
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() + " ---> "
+ v.getPrix() + " dt");
}
final ListView listView = (ListView) findViewById(R.id.listView1);
listView.setAdapter(new ArrayAdapter<String>(Main.this, R.layout.affiche, R.id.textView5,listvendeurtri));
In main.xml i have the listview and in affiche.xml i have textview and 2 button..
How can I make this work?