title: One AlertDialog, Used in Multi Activities?
body: <p>I have an AlertDialog that needs to be used in several Activities. How can I accomplish this with its own Class? Thank-you for your help!~!</p>
  
  <p>I tried the following and acces it in an Activity w:</p>
  
  <pre><code>Alerts.sdCardMissing();
  </code></pre>
  
  <p>The class I 'tried' to create:</p>
  
  <pre><code>public class Alerts {
  
  public static void sdCardMissing() {
      AlertDialog alertDialog = new AlertDialog.Builder(null).create();
      alertDialog.setTitle("External Storage State");
      alertDialog
              .setMessage("Your SD-Card is not mounted!  If the device is plugged into a computer via the USB, please disconect the device.");
      alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
          public void onClick(DialogInterface dialog, int which) {
              // this.finish();
          }
      });
      // alertDialog.setIcon(R.drawable.icon);
      alertDialog.show();
  }
  </code></pre>
  
  <p>}</p>