android - How to display a "Loading..." text while retrieving items for a ListView -


there others applications doing this, twitter, facebook, or native applications such android market. when want display list of items retrieved internet, looks standard way displaying user notification action in progress. white background screen animated spinning wheel , "loading..." text.

does know how this?

i've been able similar code, don't 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 bottom adapter's getview should return view "loading.." text , spinning progress. @ same time asynctask or background thread should started downloads new chunk of content. when content ready adapter.notifydatasetchanged() called , listview redisplays content including new items.

so "loading..." message last item in listview.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -