title: Android - Best way of avoiding Dialogs to dismiss after a device rotation
body: <p>After a long search around this forum, I found a lot of answers where people propose using solutions for avoiding dialogs to dismiss after rotation, just like:</p>
  
  <pre><code>android:configChanges="keyboardHidden|orientation"
  </code></pre>
  
  <p>Or override the following method, which appeared to be the most recommended:</p>
  
  <pre><code>protected Dialog onCreateDialog(int id)
  </code></pre>
  
  <p>But, after look around the Android Reference Documentation, I could notice that these Dialog  methods are being deprecated.</p>
  
  <p>So, the obvious question is:</p>
  
  <p><em>Today, what is the best way of avoiding Dialogs to dismiss after a device rotation?</em></p>
  
  <p>Thanks in advance.</p>