Android: AlertDialog
<p>I have static method in which i create a dialog </p>

<pre><code>public static void showDialog(Context context) {
    AlertDialog.Builder builder = new AlertDialog.Builder(context);
    builder.setTitle("Title");
    builder.setMessage("Message");
    builder.setPositiveButton("ok", new OnClickListener() {
            public void onClick(DialogInterface dialog, int arg1) {
                dialog.dismiss();
            }});
    builder.setCancelable(false);
    builder.create().show();
}
</code></pre>

<p>In my app there is can be a situation when method can be called several times, but i don't want to open 2 or more dialogs. How to check is the dialog opened or not ? Thanks...</p>
