Question

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,

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top