title: Find a reference to AppCompatDialogFragment
body: <p>In my Andriod app, I've got a Dialog extended from AppCompatDialogFragment. I show it immediatelly in my App's main Activity's onCreate:</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedState)
    {
    super.onCreate(savedState);
  
    // ....
  
    if( savedState==null )
      {
      MyDialog diag = new MyDialog();
      diag.show(getSupportFragmentManager(), null);
      }
    }
  </code></pre>
  
  <p>later on I want to dismiss this dialog - so I need to find it. I cannot simply remember a reference to it in my Activity, as when I e.g. rotate the phone the Dialog gets recreated and my reference would be invalid. </p>
  
  <p>How do I get a reference to MyDialog later on in my code?</p>