How do I create an instance of OnClickListener
<p>I wrote  this code, but I get an error with View.OnClickListener.</p>

<p>The error said that View can't be resolve as type. I have imported android.view.View.OnClickListener but still get the same error.</p>

<p>If I use the quick fix another error appears.</p>

<pre><code>public class Net extends Activity implements View.OnClickListener
{  
    EditText edt;
    TextView text;
    Button ping;

    @Override
    protected void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        edt=(EditText)findViewById(R.id.edt);
        text=(TextView)findViewById(R.id.text);
        ping=(Button)findViewById(R.id.ping);
        Button.setOnClickListener(new View.OnClickListener());
    }

     public void onClick(View v)
     {
</code></pre>
