title: How to save/restore(update) ref to the dialog during screen rotation?(I need ref in onCreate method of activity.)
body: <pre><code>protected Dialog onCreateDialog(int id) {
  ...
  AlertDialog.Builder adb = new AlertDialog.Builder(this);
  ...
  mydialog = adb.create();
  ...
  }
  </code></pre>
  
  <p>But onCreateDialog runs after onCreate.</p>