I am having a List View, all the list items(Text) need be to updated from a web service. My application can query the web service to fetch all the list items at one go or can query to fetch one list item at a time.
I having following queries
1)If i query the web service to fetch all the list items at once, it takes around 15 secs to download and display it in List. User might think the app is not responding.
2) If i query the web service for each list item, when the user scroll up or down multiple queries are sent. So i am downloading items which the user might not probably see. if the list is scrolled up.
Please suggest a good design pattern for such a scenario.
What you could do is to have the following
Basically the background service will store the items in the local sqlite db through the ContentProvider you write. The activity will then retrieve a cursor to the items, again through the ContentProvider.
This gives you the benefits that