How to update ListView on scrolling while retrieving data from server in Android?

后端 未结 3 667
广开言路
广开言路 2021-01-31 12:46

Currently, I\'m using AsyncTask to handle Http connection and retrieve data as JSON format.
Loading all data is trivial but it consumes too much time, so I decided to swi

3条回答
  •  旧巷少年郎
    2021-01-31 13:20

    Here are few useful links for it,

    Android: Implementing progressbar and "loading..." for Endless List like Android Market

    Endless Listview with current Async Task

    Android Endless List

    http://www.androidguys.com/2009/10/21/tutorial-autogrowing-listview/

    http://mylifewithandroid.blogspot.com/2010/03/progressively-loading-listviews.html

    In simple steps,

    As user scrolls – detect the end of the list
    1)Display a progress notification
    2)Ask for update
    3)Receive update (asynchronously) and extend list

提交回复
热议问题