douzhantanju1849 2014-05-09 08:40
浏览 103
已采纳

将云数据库中的大量数据处理到Listview的最佳实践?

I would like to ask for suggestions or for the best practice on how to handle a lot of data that is loaded from database(cloud/php scripts) to the android listview. I don't have any idea on how to deal with this matter.

To elaborate the scenario: lets say i have a database of list of students in a first year level. Let's say a hundred of them. In my current method, I just query all of them (showing the progressdialog) and wait until the data is all downloaded and displayed it in the listview(closing the progressdialog). I know this not the best way to do it since you need to consider bigger data.

I tried to download and test this: https://code.google.com/p/android-amazing-listview/source/checkout from google team but still i don't get the bigger picture since in the example the data is all static.

What I want to do is:

  • while downloading the data from server, a little progressbar will appear in the header of the list view and once finished it will disappear.

  • Let's say i have 100 data results, but in my listview I want to display the top 10 and once scrolled down adding another 10 and so-on.

I just want to know the proper implementation or handling of large data in listview for android.

I would really really appreciate all your suggestions and comments with my problem.

Thanks Chkm8,

  • 写回答

1条回答 默认 最新

  • dongzhansong5785 2014-08-22 15:28
    关注

    I would use the new Volley API issued late last year to implement this. A great example which can help you implement this is the following tutorial.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 易语言把MYSQL数据库中的数据添加至组合框
  • ¥20 求数据集和代码#有偿答复
  • ¥15 关于下拉菜单选项关联的问题
  • ¥20 java-OJ-健康体检
  • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况