i want the numbers to be displayed in this format..
1 2 3 4 5 ^ where if i press 5, then it should display from 5 to 10
5 6 7 8 9 10
til
If you have a List of records then you can do pagination using subList method of List.
subList
List
List.subList(fromIndex, endIndex); returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive
List.subList(fromIndex, endIndex);
returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive