Custom button example not working
<p>I am newbie in android application development.
I am using the Form Stuff example given on <a href="http://developer.android.com/resources/tutorials/views/hello-formstuff.html" rel="nofollow">http://developer.android.com/resources/tutorials/views/hello-formstuff.html</a>. In this i have used the custom button example.</p>

<p>My code is as below:</p>

<pre><code>    package com.example.helloformstuff;

    import android.app.Activity;
    import android.content.DialogInterface.OnClickListener;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.Button;
    import android.widget.Toast;

    public class HelloFormStuff extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        final Button button = (Button) findViewById(R.id.button);
        button.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                // Perform action on clicks
                Toast.makeText(HelloFormStuff.this, "Beep Bop", Toast.LENGTH_SHORT).show();
            }
        });    

    }
   }
</code></pre>

<p>Its showing following error:</p>

<pre><code>The type new DialogInterface.OnClickListener(){} must implement the inherited 
     abstract method DialogInterface.OnClickListener.onClick(DialogInterface, int)
    - The method setOnClickListener(View.OnClickListener) in the type View is not 
     applicable for the arguments (new DialogInterface.OnClickListener(){})
</code></pre>

<p>I am unable to figure out the reason for such error.</p>

<p>Please help me on this.</p>

<p>Thanks</p>

<p>Pankaj</p>
