Button inside SimpleCursorAdapter
<p>Hey :) here is my problem. I've a ListView that I populate with a SimpleCursorAdapter. For each item in my list i've, in this order: TextView > RatingBar > TextView > ImageView. I want to add a button on the ImageView but I dont know how to this...</p>

<p>Where I populate the ListView:</p>

<pre><code>adapter = new SimpleCursorAdapter(this, R.layout.beerdrunk, cursor,
            new String[] { "beers", "notes", "numbers" }, new int[] {
                    R.id.champName, R.id.champNote, R.id.champDrunk });
    adapter.setViewBinder(binder);
    list = (ListView) findViewById(R.id.listMyBeers);
    list.setItemsCanFocus(true);
    list.setOnItemClickListener(onClickBeer);
    list.setAdapter(adapter);
</code></pre>

<p>The OnItemClickListener:</p>

<pre><code>private OnItemClickListener onClickBeer = new OnItemClickListener() {
    @Override
    public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2,
            long arg3) {
        System.out.println(""+ arg0);
        System.out.println(""+ arg1);
        System.out.println(""+arg2);
        Intent newActivity = new Intent(MyBeers.this, DetailsBeer.class);
        newActivity.putExtra("com.example.checkmybeer.DetailsBeer", ""
                + arg3);
        startActivityForResult(newActivity, 0);
    }
};
</code></pre>

<p>And the XML for beerdrunk:</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"&gt;

&lt;TextView
    android:id="@+id/champName"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_weight="130"
    android:gravity="center_vertical"
    android:layout_gravity="center_vertical"
    android:maxLines="3"
    android:padding="5dp"
    android:paddingRight="20dp"
    android:singleLine="false"
    android:text="@string/beerBook"
    android:textColor="@color/black1"
    android:textSize="20sp"
    android:textStyle="bold" &gt;
&lt;/TextView&gt;

&lt;View
    android:layout_width="1.5dip"
    android:layout_height="fill_parent" /&gt;

&lt;RatingBar
    android:id="@+id/champNote"
    style="@style/beerRatingSmall"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:isIndicator="true"        
    android:numStars="5"
    android:layout_margin="1.5dp"
    android:rating="5"
    android:stepSize="0.10" &gt;
&lt;/RatingBar&gt;

&lt;View
    android:layout_width="1.5dip"
    android:layout_height="fill_parent" /&gt;

&lt;TextView
    android:id="@+id/champDrunk"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_weight="30"
    android:gravity="right|center_vertical"
    android:padding="5dp"
    android:layout_marginLeft="5dp"
    android:text="200"
    android:textColor="@color/black1"
    android:textSize="20sp"
    android:textStyle="bold" /&gt;

&lt;View
    android:layout_width="1.5dip"
    android:layout_height="fill_parent" /&gt;

&lt;ImageView
    android:id="@+id/champPlusone"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_gravity="center_vertical|right"
    android:layout_margin="5dp"
    android:layout_weight="30"
    android:gravity="right|center_vertical"
    android:clickable="false"
    android:src="@drawable/plus2" /&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>I've tried something like:</p>

<pre><code>    if(arg2 instanceof ImageView){
     //do some stuff
    }
</code></pre>

<p>But it does not work... How can i do to know which view is clicked inside my "row" ?</p>
