开发者

Getting stuck implementing pagination in Android

开发者 https://www.devze.com 2023-01-31 20:58 出处:网络
I have the following requirements. I am displaying 10 items in a ListView in which each List item displays 2 text views & one thumbnail image . I have coded to display the images asynchronously

I have the following requirements.

  1. I am displaying 10 items in a ListView in which each List item displays 2 text views & one thumbnail image . I have coded to display the images asynchronously , since I need to fetch the images using url. The data for the list item is being fetched from server. In the response , I get the information whether any more pages are available for display.

  2. After the user scrolls 开发者_StackOverflow社区to the 10 items , I need to call the webservice to fetch the next 10 list of items from the server . When the user scrolls to the 10 th element of the first page , a small progress dialog is displayed at the end of the screen & information is fetched from the server & the view is updated . Also if the user scrolls up , new call to the webservice is not made to the server & the display contains all the list items.

I received few suggestions but am unable to implement the pagination . Kindly help as I am stuck on this problem for more than 3 weeks.


You might try my EndlessAdapter and see if either it can solve your problem directly or give you ideas of how to implement your own take on the concept.

0

精彩评论

暂无评论...
验证码 换一张
取 消