0

I am new on android developing and I am meat a problem trying to associate a ListView with Buttons on the row.I am declaring the button in my adapter but I cant fire a key listener in my activity.

public class ntAdapter extends BaseAdapter {
    holder.image = (ImageView) convertView.findViewById(R.id.imageView1);
    holder.AddBut=(ImageButton) convertView.findViewById(R.id.imageButton1);
}

In my activity I have a listview

public class Zmenu extends Activity {
    ntAdapter adapter=new ntAdapter(this);

    ListView l1 = (ListView) findViewById(R.id.ListView01);
    l1.setAdapter(adapter);
}

What is the code in this case to have a key listener on my image Button??

rekaszeru
  • 19,130
  • 7
  • 59
  • 73
George32x
  • 1
  • 1
  • 2

1 Answers1

0

Take a look at Using Android, how can I select rows from a ListView which contains Button controls

And make use of the View Holder Pattern.

Community
  • 1
  • 1
Thane Anthem
  • 4,093
  • 4
  • 26
  • 24