AlertDialog Performance Issue
<p>I have a case where I need multiple <code>checkboxes</code> so that can apply a filter on some results as per selected items. I have used a <code>Listview</code> having a simple <code>checkbox</code> in it and put this layout in <code>AlertDialog</code>. </p>

<pre><code>alertDialog.setView(view); //in view I have got inflated my layout
</code></pre>

<p>There is a <code>button</code> upon clicking it I'm triggering the <code>AlertDialog</code>.</p>

<p>My issue is upon clicking the <code>button</code> it takes more than 3-4 seconds to show the <code>AlertDialog</code> which is a bad UI experience.</p>

<p>Unfortunately I'm unable to put my code, but its very simple as I have explained.</p>

<p>I need to ask am I doing any thing wrong? as triggering it from <code>onClick()</code> or I have to use <code>Handler</code> or <code>Worker Thread</code>.Can any one guide me or give me insight of the problem so that I can make the performance better.</p>

<p>Right now I have tested with 8 <code>checkboxes</code> , and in my case I can have upto 20 <code>checkboxes</code>.</p>