Closed YangShaoXiong closed 7 years ago
你可以通过 RecyclerRefreshLayout.setRefreshTargetOffset(float)设置一下位置
还有个问题就是,我在onCreate方法里直接调用setRefreshing(true)的方法,也就是我想让已进入该页面就去自动执行下拉刷新效果。但是它不响应onRefresh方法了
嗯嗯 不响应onRefresh是正确的行为, android自带的SwipeRefreshLayout就是这样的, 一般的封装行为都是调用setRefreshing(true)然后调用网络请求
OK。原来这样啊。那么问题来了,就是在下拉刷新的时候,会出现屏幕上所有的控件会失去焦点,就是在下拉刷新的时候,不能再滑动列表,只能等它下拉刷新完成。
@YangShaoXiong 你使用的是最新版本吗?
设置自动刷新setRefreshing(true),不回调onRefresh方法,还有就是RefreshView不设置pinned紧贴底部,设置pinned紧贴顶部,然而在你给出的demo里,没有我说的这种情况,我也仔细看了你给出的demo。发现也没有什么不同之处,唯一不同就是adapter我用了这个库https://github.com/CymChad/BaseRecyclerViewAdapterHelper, 麻烦在百忙之中,看看能否帮我只个招。提前谢谢了。