• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pagination in ListView

 
Swastik Dey
Rancher
Posts: 1602
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to show n number of items in a ListView, so sometimes the vertical scrolling becomes too long. Is there any way to paginate the display. For e.g. initially it displays first 5 items in the list, and on any user interaction it displays the next 5 or previous 5 items.
 
Misha van Tol
Ranch Hand
Posts: 56
Android Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not in the API as far as I know, but you can of course manually fill the ArrayList that's attached to the adapter with various items based upon some user action.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic