title: Can't use onDismiss() when using custom dialogs - Android
body: <p>I'm working on a little program, and I need to add a custom dialog that passes some info to the calling acitivity when it closes.
  I extended the dialog class, and when I try to capture the custom dialog when it closes,using an onDismiss listener, it never reaches it because I used a custom dialog.</p>
  
  <p>This is part of my activity -</p>
  
  <pre><code>    .
      .
      .
         attributes customizeDialog = new attributes(con,position,pick.getLastVisiblePosition());
          customizeDialog.show();
  </code></pre>
  
  <p>(The attributes being the name of the class that extends the dialog class).</p>
  
  <p>Here is the event listener I set up when the dialog finishes -</p>
  
  <pre><code>    customizeDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
  
          @Override
          public void onDismiss(DialogInterface dialog) {
              Log.v("LOG_CAT",attributes.selectedIndexes.get(0) + " " + attributes.selectedIndexes.get(1) + " " + attributes.selectedIndexes.get(2) + " " + attributes.selectedIndexes.get(3) + " " + attributes.selectedIndexes.get(5) + " ");
      }
  
  });
  </code></pre>
  
  <p>I know i'm doing it wrong,I just don't know how to fix it.</p>
  
  <p>I would really appreciate any help with this problem.</p>
  
  <p>Thanks!</p>