ListView判断滑动底部
2015-09-26 10:46
281 查看
通过实现OnScrollListener这个接口,然后复写
Callback method to be invoked when the list or grid has been scrolled. This will be called after the scroll has completed
Parameters
这个方法,firstVisibleItem + visibleItemCount 等于 totalItemCount 的时候那么就说明滑动到底部了。
public abstract void onScroll (AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount)
Since: API Level 1Callback method to be invoked when the list or grid has been scrolled. This will be called after the scroll has completed
Parameters
view | The view whose scroll state is being reported |
---|---|
firstVisibleItem | the index of the first visible cell (ignore if visibleItemCount == 0) |
visibleItemCount | the number of visible cells |
totalItemCount | the number of items in the list adaptor |
@Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { }
这个方法,firstVisibleItem + visibleItemCount 等于 totalItemCount 的时候那么就说明滑动到底部了。
相关文章推荐
- 发挥正能量:帮助别人不孤独,跟人计较是自杀。
- JS实现可拖曳、可关闭的弹窗效果
- UNIX环境高级编程学习环境搭建---apue.h(第三版)
- 阿里云服务器windows版本的使用以及安全策略的添加
- iOS tabbar 背景,右上角数字,tabbar获取方法 总结
- HTML属性是什么?
- AWK 学习笔记
- 打开一个新窗口
- Codevs1166 矩阵取数游戏
- POJ - 3616 Milking Time(DAG)
- .c和.h档
- 心灵鸡汤
- sourceinsight 无法搜索类似 .s .S .kconfig文件的解决办法
- hdu5249KPI【treap】
- 生活随笔:折腾的家具
- 2015/9/26,中秋前一天
- 【Odoo】XML_RPC访问Odoo数据库
- https 基础
- 浅析 PHP 官方自动化测试方法
- QtQuick桌面应用程序开发指导 3)达到UI而功能_B 4)动态管理Note物_A