I am developing one app which is based on the webservice and fetch the all data and inflate it into the list with the one image and 3 text view. But it will fetch the all the items which is coming from the web service which is too much time consuming in fetching the data.
I have reached to some of the examples like “pull to refresh” and “View after the list view” when this view is clicks the it loads the data.
I have used the Json and Ksoap2 library for the webservice and responce will be in the JSON form.
Thannks in advance.
Can I see your getView method?
As I understand, getView gets called whenever some row gets visible, so you should implement your logic inside the getview method where you retrive data only for this one particular row. This way your web service gets called only when it is necessary.
But if that isn’t what you had in mind, you could do the following.
The first time, you fetch data only for 20 items and loads them into some ArrayList. Than you implement OnScrollListener and add the new data to your list (the ArrayList, not the listView) whenever you press load more. So even if you update yout listview with all data, it is loaded from memory, not from your service. Here is a post about OnScrollListener.