title: AlertDialog not dismissing
body: <p>I'm making a small game and I'm trying to show an AlertDialog, the problem is, when the user clicks on an option the AlertDialog won't dissapear.</p>
  
  <p>I'm using loopers so my game thread stops (looper) when my AlertDialog appears and when the user clicks "Cancel" the game thread runs again but the dialog is on top and the user can't keep playling.</p>
  
  <pre><code>public void alerta(){
      Looper.prepare(); 
      myHandler = new Handler();
  
  
      AlertDialog.Builder alertadd = new AlertDialog.Builder(_context);
      LayoutInflater factory = LayoutInflater.from(_context);
      final View view = factory.inflate(R.layout.custom_dialog, null);
      alertadd.setView(view);
      alertadd.setNeutralButton("Tomar Foto", new DialogInterface.OnClickListener() {
              public void onClick(DialogInterface dlg, int sumthin) {
                  stops++;
                  Toast.makeText(_context.getApplicationContext(), "Tomaste Foto", Toast.LENGTH_SHORT).show();
              }
          });
      alertadd.setNegativeButton("Cancelar", new DialogInterface.OnClickListener() {
          public void onClick(DialogInterface dlg, int sumthin) {
              System.out.println("Stops = "+stops);
              stops++;
              Toast.makeText(_context.getApplicationContext(), "Cancelar", Toast.LENGTH_SHORT).show();
              myHandler.getLooper().quit();
              dlg.dismiss();
          }
      });
  
      alertadd.show();
      Looper.loop();      
  
  }
  </code></pre>