There are some others applications doing this, like Twitter, Facebook, or even native applications such as Android Market. When you want to display a list of items retrieved from the internet, this looks like a standard way for displaying the user some notification about action in progress. This is a white background screen with an animated spinning wheel and a "Loading..." text.
Does somebody know how to do this?
I've been able to do something similar with this code, but I don't like it too much yet. Still work in progress:
<ListView android:id="@+id/post_list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView android:id="@android:id/loading"
android:background="@color/white"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center" android:text="Loading..." />
When user scrolls to the bottom your adapter's getView should return a view with "Loading.." text and spinning progress. At the same time AsyncTask or background thread should be started that downloads a new chunk of content. When content is ready adapter.notifyDatasetChanged() is called and ListView redisplays all content including the new items.
So "Loading..." message is just a last item in the ListView.
I don't know whether it will completely fits your requirement, simple way is just set the loading text initially to android-empty-id-view like
and if no list items found then set android-empty-id-view to different message in async callback
it will give enough indication to user that something is progressing..i.e list is loading
That's done with the help of AsyncTask (an intelligent backround thread) and ProgressDialog
When the AsyncTask starts we reaise a progressdialog with indeterminate state, once the task is finished we dismiss the dialog.
Example code
What the adapter does in this example is not important, more important to understand that you need to use AsyncTask to display a dialog for the progress.