With a complex adapter,
ListViews can sometimes take a long time to populate after calling the
setAdapter() method. Is there a method we can override that is triggered when the view has been successfully populated with data and is ready to be shown?
My feeling is that it isn't the
setAdapter() that takes a long time, but rather that the complex adapter is doing something complex. The ListView and GridViews are specified to work rather quickly, but there's a few reasons they might be slower. Here's a few thoughts as to how to work this one out.
AsyncTask. This will do the complex part of your code in the background, and only show the result when it is complete. This works well for things like network calls, loading bitmaps, etc.