[Solved] Android ListView load more data from Server [closed]


Yes it is, but it requires implementation changes both from the client side and server side. You need to define one offset , suppose 25, which means at once on first server call 25 items will be fetched and loaded in the adapter . Now the second part is like this :

You start scrolling and reach 15th item, at this point again you need to make the server call again with the offset 50 so that next 25 items will be fetched from the server and then appended to the previous list. This makes the total no. of items in the adapter 50. Now again you need to make the server call when you reach 15+25=40th item. And this continues.

To improve the performance still more, and if you have hundreds of data , you need to do reverse of this when you scroll up. That means suppose you have reached 100th item while scrolling down.This means in your listview adapter there are more than 100 items , at this point you need to start deleting the items from the top slots of the list, and again you need to fetch them when you scroll up.

Of’Course all these need to be done if you really have a lot of items in your list and even the listview items are heavy.

1

solved Android ListView load more data from Server [closed]