Meaningless Drivel is fun!*
The moose likes Android and the fly likes Pagination in ListView Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Pagination in ListView" Watch "Pagination in ListView" New topic
Author

Pagination in ListView

Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1473
    
    6

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.


Swastik
Misha van Tol
Ranch Hand

Joined: Jan 02, 2010
Posts: 56

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.
 
subject: Pagination in ListView