使用开源的PullToRefreshScrollView scrollTo和scrollby遇到的问题

时间:2023-03-09 08:06:20
使用开源的PullToRefreshScrollView scrollTo和scrollby遇到的问题

在项目中使用了开源的com.handmark.pulltorefresh.library 下拉刷新组件,当中使用了PullToRefreshScrollView ,须要调用scrollTo或者scrollBy滑动到指定的位置。

直接使用PullToRefreshScrollView .scrollTo方法发现会有bug,查了下代码发现是view的方法。

调用

scrollView = pullScrollView.getRefreshableView();

就会得到PullToRefreshScrollView 封装的scrollView之后再调用scrollTo就没出现故障了。