ListView.smoothScrollToPositionFromTop
来源:互联网 发布:安卓助手for mac 编辑:程序博客网 时间:2024/06/14 03:18
/**
* Smoothly scroll to the specified adapter position. The view will scroll
* such that the indicated position is displayed <code>offset</code> pixels below
* the top edge of the view. If this is impossible, (e.g. the offset would scroll
* the first or last item beyond the boundaries of the list) it will get as close
* as possible.
*
* @param position Position to scroll to
* @param offset Desired distance in pixels of <code>position</code> from the top
* of the view when scrolling is finished
*/
public void smoothScrollToPositionFromTop(int position, int offset) {
if (mPositionScroller == null) {
mPositionScroller = createPositionScroller();
}
mPositionScroller.startWithOffset(position, offset);
}
//第一个参数就是滚动到的位置(position+1)
//第二个参数是0就该itemView.getTop()=0
//大于0 就该itemView.getTop()>0
//小于0 就该itemView.getTop()<0
* Smoothly scroll to the specified adapter position. The view will scroll
* such that the indicated position is displayed <code>offset</code> pixels below
* the top edge of the view. If this is impossible, (e.g. the offset would scroll
* the first or last item beyond the boundaries of the list) it will get as close
* as possible.
*
* @param position Position to scroll to
* @param offset Desired distance in pixels of <code>position</code> from the top
* of the view when scrolling is finished
*/
public void smoothScrollToPositionFromTop(int position, int offset) {
if (mPositionScroller == null) {
mPositionScroller = createPositionScroller();
}
mPositionScroller.startWithOffset(position, offset);
}
//第一个参数就是滚动到的位置(position+1)
//第二个参数是0就该itemView.getTop()=0
//大于0 就该itemView.getTop()>0
//小于0 就该itemView.getTop()<0
0 0
- ListView.smoothScrollToPositionFromTop
- android listView.smoothScrollToPositionFromTop
- java.lang.NoSuchMethodError: smoothScrollToPositionFromTop for Froyo ListView?
- Android Listview 中smoothScrollToPositionFromTop 有时滚动到指定无效
- ListView smoothScrollToPositionFromTop 偶现滚动位置不精确问题解决办法
- 关于Listview,GridView中smoothScrollToPositionFromTop有时滚动到指定position无效
- smoothScrollToPositionFromTop和smoothScrollToPosition的区别
- smoothScrollToPositionFromTop girdview 有时滚动到指定无效
- Android关于gridview平滑滚动定位smoothScrollToPositionFromTop方法测试
- Android关于gridview平滑滚动定位smoothScrollToPositionFromTop方法测试
- listview
- listview
- listview
- ListView
- ListView
- listview
- listview
- listView
- Eclipse常用快捷键
- 友盟全域指数
- 如何理解HTTP协议的 “无连接,无状态” 特点?
- 随机初始化在无监督特征学习中的作用
- Git_Git远程操作_第1课_ssh agent 管理 ssh key
- ListView.smoothScrollToPositionFromTop
- APP推荐 - AirMore:移动设备与电脑间互传文件(iOS/Android)
- 刷刷笔试题~~[递归类编程]
- jackson 进行json解析和序列化
- ClickOnce证书签名过期处理方案及工具
- pcie 驱动程序分析
- 安卓基础(一)
- centos7源码安装nodejs
- poj3111- POJ - 3111 K Best (二分 + 01分数规划)