AlertDialog.Builder How Can I Access the the 'PositiveButton'?
<p>I am using <code>AlertDialog.Builder</code> to create a dialog with a <code>EditText</code> and two buttons, <code>'OK'</code> and <code>'Cancel'</code>. I create the OK and Cancel buttons with <code>AlertDialog.Builder.setPositiveButton()</code> and <code>.setNegativeButton()</code> respectively. The purpose of the dialog is to request an I.P. address from the user.</p>

<p>Initially I want to have the OK button disabled and attach to the <code>EditText</code> an <code>OnKey listener</code> so that when the user types the onKey listener is called and I can check the current <code>EditText</code> value with a regular expression for a valid IP address. Should a valid IP address be entered I'd then want to enable the OK button, but as I use the <code>setPositiveButton()</code> I have no idea what the id of the button is. </p>

<p>Can I get the id of the OK button?</p>
