onDialogClosed listener of onDialogClosed
<p>I have <code>DialogPreference</code> dialog instance. How can i register an listener on <code>onDialogClosed</code>. I want when <code>Ok</code> button is clicked to execute some code.</p>

<p>Is this possible to do with instance of <code>DialogPreference</code> ?</p>

<p>I know I can do it like</p>

<pre><code>@Override
protected void onDialogClosed(boolean positiveResult) {
    if (positiveResult) {
      String text=MyEditText.getText();
    }
    else {
     // cancel hit
    }
}
</code></pre>

<p>but i am not extending <code>DialogPreference</code>. i have just instance of it.</p>
