ListView with tow Buttons
<p>Hello I am trying to make a listView with tow buttons on each row.I have an adapter where the buttons and the rest views of my list are declared. My problem is that I can not fire the buttons from my main activity.I thought the code below should work but it didn't.</p>

<pre><code>  public class Zmenu extends Activity {

   final EfficientAdapter Myadapter=new EfficientAdapter(this);

    final ListView l1 = (ListView) findViewById(R.id.ListView01);

    l1.setAdapter(Myadapter);

    l1.setOnItemClickListener(new OnItemClickListener() {

            public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2,
                            long arg3) {
                    switch(arg1.getId()) {
            case R.id.Button1 :
                    //do this block
                break;
        case R.id.Button2 :
                   //do this block
                break;
        }
}});
}
</code></pre>

<p>Can anyone helps me on what I am doing wrong in how could I fire the key listener in my main activity?</p>
