Showing simple message dialogs
<p>In my activity, I'd like to show simple info dialogs, stuff like:</p>

<pre><code>new AlertDialog.Builder(context).setMessage(message).show();
</code></pre>

<p>if I do that, the dialog will leak when I rotate that phone (not to mention it will disappear as well, so the user may miss it). I can use the managed dialogs, but I'm not sure how you use it sensibly for these types of short messages? Looks like you have to do this:</p>

<pre><code>showDialog(SOME_DLG_ID);
...
@Override
onCreateDialog(int id) {
    if (id == SOME_DLG_ID) {
        new AlertDialog.Builder(context).setMessage(message).show();
    }
}
</code></pre>

<p>there's no way to pass what the message should be into onCreateDialog since its an override method. I'd hate to make a member variable of the parent activity that just stores whatever the current message should be. How do you all do it?</p>

<p>Thanks</p>
