首页 > 学院 > 开发设计 > 正文

recyclerView更新数据,定位到某个位置

2019-11-09 15:09:18
字体:
来源:转载
供稿:网友

一共有三种方法

第一种:坐标定位

mRecycleView.smoothScrollBy(distance,duration);

第二种:

mRecycleView.smoothScrollOffset()

第三种:推荐,索引定位,参数也可以通过adapter的getItemCount()-1定位到最底部

wraPRecyclerView.smoothScrollToPosition(0);


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表