Android: Converting OnItemClick to OnClickListener
<p>previously I have this OnItemClick method which enables the user to click the row on the listview and leads to a new activity bringing some attributes (texts,image) to a new activity</p>

<pre><code>public void onItemClick(AdapterView&lt;?&gt; l, View v, int position, long id) {
        Intent listIntent = new Intent(this, DetailsActivity.class);
        listIntent.putExtra("spendino.de.ProjectDetail.position",position);
        listIntent.setData(Uri.withAppendedPath(Uri.withAppendedPath(
                Provider.CONTENT_URI, Database.Project.NAME), Long
                .toString(id)));
        startActivity(listIntent);

    }
</code></pre>

<p>But now I just implemented a 'View' to my CursorAdapter. It's impossible to implement <code>onItemClick</code> to the row layout, what I can do is implement onClick to it. But I'm having trouble converting the method content from my previous OnItemClick to <code>OnClickListener</code>.
I need the method to behave like my previous OnItemClick.</p>

<p>Because I need to declare some attributes like position, and id which aren't available in this method.</p>

<pre><code>convertView.setOnClickListener(new OnClickListener() {
                 public void onClick(View view) {


                 }
                });
</code></pre>

<p>Therefore I need the <code>OnClickListener</code> method to behave like my previous <code>OnItemClick</code>.
Can anybody help me?</p>

<p>Thank you very much.</p>
