How to dissmiss dialog on single click?
<p>I am using a dialogbox contains list of StringArray.
I wants to dissmiss dialog on single click on item of StringArray.
But it is dissmissed after double click.</p>

<p>Thanks.</p>

<pre><code>final Dialog dialog = new Dialog(Disease.this);
            dialog.setCancelable(true);
            dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
            final ListView listSpecialityView = new ListView(Disease.this);
            listSpecialityView.setCacheColorHint(Color.TRANSPARENT);
            listSpecialityView.setAdapter(adapter_list);

            listSpecialityView
                    .setOnItemClickListener(new OnItemClickListener() {

                        public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1,
                                int arg2, long arg3) {
                            // TODO Auto-generated method stub
                            // Txt_Speciality.setText(Speciality_array[arg2]
                            // .toString());
                            // String id = String.valueOf(arg2);
                            if(immunString.equalsIgnoreCase("immun")){
                                data = immunizationsStrings[arg2];
                            }else {
                                data = Drugs[arg2];
                            }

                            showDialog(1);
                            dialog.dismiss();

                            //dialog.dismiss();
                        }
                    });
            dialog.setContentView(listSpecialityView);
            dialog.show();
</code></pre>
