jeudi 19 mai 2016

AlertDialog Performance Issue

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

alertDialog.setView(view); //in view I have got inflated my layout

There is a button upon clicking it I'm triggering the AlertDialog.

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

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

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

Right now I have tested with 8 checkboxes , and in my case I can have upto 20 checkboxes.




Aucun commentaire:

Enregistrer un commentaire