title: Open url from Dialog class
body: <p>i try to open an url form a dialog class. I tried it with following code, but I get a NullPointerException. How can I do this?</p>
  
  <p>I start the Dialog with following from my Activity:</p>
  
  <pre><code>AboutDialog about = new AboutDialog(this);
  about.setTitle(R.string.Text_about);
  about.show();
  </code></pre>
  
  <p>This is the Dialog class:</p>
  
  <pre><code>public class AboutDialog extends Dialog implements OnClickListener{
  private Button button_ok;
  .
  .
  .
  
  }
  
  public void onClick(View arg0) {
              myActivity activity = new myActivity();
              String url = "http://www.test.com";
              Intent i = new Intent(Intent.ACTION_VIEW);
              i.setData(Uri.parse(url));
              activity.startActivity(i); 
  }
  </code></pre>