What is the proper way to handle a ProgressDialog using Activity lifecycle methods?
<p>I have been bitten by: "java.lang.IllegalArgumentException: View not attached to window manager", when using a ProgressDialog in an Activity.</p>

<p><strong>What is the proper way to handle a ProgressDialog using Activity lifecycle methods ?</strong>  </p>

<p>Working code example much appreciated...</p>
