查一下API看看ArrayList有哪些方法,基本上用这两个就可以实现你的要求吧:
//Get the number of the elements
ArrayList.size()
//Get the element at the specified position in this list
ArrayList.get(int index)
1。根据list里的总元素数和一页显示元素数计算总页数
2。根据一页显示元素数和当前页码计算index的最小值min和最大值max
for i from min to max
ArrayList.get(i)