views:

30

answers:

2

When my ListView activity loads it creates the Adapter which fills the screen as it should do. Is there an event or way to find out when the Adapter has finished getting enough data to fill the screen.

I want to show a spinner the first time the Activity loads and have it go away once the screen has its first load of data from the Adapter.

+1  A: 

Well as your question suggests, i guess an adapter can only take time if you download data to be shown, If that is the case then you can always use background threads, i.e. extending the AsyncTask And starting a progressbar (determinate or indeterminate) and removing it after your task is complete...

Hope this helps!

JaVadid
A: 

You can spawn a worker thread and create and assign the adapter from there. Refer to this for how to create a worker thread. The adapter doesn't load all the data in the ListView at once. It will load only the visible data; rest will be loaded when you scroll through the ListView.

deltasquare4
Is there a life cycle even in the Adapter that says, "I have loaded and display enough info to fill a page" ?
BahaiResearch.com