ListView with different actions acording to View
<p>I want to make a listview with two image views in it and two different actions for the listener case the image the user touches.So this is my code </p>

<pre><code>        l1.setOnItemClickListener(new OnItemClickListener() {

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

<p>Can someone tell me what is wrong with my code ?</p>
