How to define AlertDialog.Builder inside a newView/bindView
<p>I have a ListView and I'm using SimpleCursorAdapter to populate the content, and newView &amp; bindView to get the View.</p>

<p>I want to enable that everytime the button on the row list is clicked, it loads an AlertDialog box.</p>

<p>Here's the code:</p>

<pre><code>btn.setOnClickListener(new OnClickListener() {
 public void onClick(View view) {
    Intent intent = getIntent();
    if (intent != null) {
    Uri uri = intent.getData();
    if (uri != null) {
    Cursor cursor = managedQuery(uri, new String[] {
    BaseColumns._ID, Database.Project.C_PRICE, Database.Project.C_KEYWORD,
    Database.Project.C_SHORTCODE}, null, null, null);

if (cursor == null) {
finish();
} else {
if (cursor.moveToFirst()) {

AlertDialog.Builder alertbox = new AlertDialog.Builder(this);                                             
alertbox.setTitle("SMS");
</code></pre>

<p>I always get an error on this line: <code>AlertDialog.Builder alertbox = new AlertDialog.Builder(this);</code></p>

<p>It says: <code>The constructor AlertDialog.Builder(new View.OnClickListener(){}) is undefined</code></p>

<p>how am I able to do that?</p>
