This Question have no Text answers yet!

Slow AlertDialog.show(). Pre-load dialog?

Question!

I need to show an AlertDialog that contains an ArrayAdapter with around a dozen items (images and text). When the app starts there is a loading screen during which multiple things are set up. One of the setup tasks is creating and building the AlertDialog.

Then, when the Dialog has to be shown, it is only needed to call dialog.show(). However, on the first time the dialog is shown, there is still a very noticeable delay before clicking to open and the dialog showing. This delay is gone after the first time the dialog is shown.

Shouldn't there be no delay since the dialog has already been created? What more is left for the dialog to be completely loaded (and hence no delay on first click)?

By : AmiguelS


Video about Slow AlertDialog.show(). Pre-load dialog?