SwipeRefreshLayout 在将支持库更新到 23.2.0 后阻止 AppBarLayout 向下滚动并显示刷新圈
SwipeRefreshLayout prevents AppBarLayout scrolling down with showing refresh circle after updating support libs to 23.2.0
将 google 库更新为 23.2.0
后面临的问题是以前的支持库版本(我记得是 22+
或 23.1.0
)。
我在 SwipeRefreshLayout
中有 RecyclerView
,在 CoordinatorLayout
中有 AppBarLayout
和 CollapsingToolbarLayout
。
因此,当我 CollapsingToolbarLayout
未完全展开并尝试展开它时,会出现 swipeRefresh indicator
,而不是展开 CollapsingToolbarLayout
.
我能做什么?
这似乎是 23.2.0
版本支持库中的一个新旧错误。
当我将依赖项更改为旧版本 (23.1.1
) 时,错误消失了。
现在我们应该等待旧错误的新错误修复。
有一个依赖列表,您应该不更新到23.2.0
以避免这个错误:
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
您还可以使用 workaround 覆盖 SwipeRefreshLayout
这里是 link 到 google bugtracker:RecyclerView v23.2.0 - doesn't play nicely with SwipeRefreshLayout
UPD 08.04.2016:
问题已在库版本 23.3.0
中修复。
这是我通过修复 SwipeRefreshLayout
中的嵌套滚动的解决方案:
将 google 库更新为 23.2.0
后面临的问题是以前的支持库版本(我记得是 22+
或 23.1.0
)。
我在 SwipeRefreshLayout
中有 RecyclerView
,在 CoordinatorLayout
中有 AppBarLayout
和 CollapsingToolbarLayout
。
因此,当我 CollapsingToolbarLayout
未完全展开并尝试展开它时,会出现 swipeRefresh indicator
,而不是展开 CollapsingToolbarLayout
.
我能做什么?
这似乎是 23.2.0
版本支持库中的一个新旧错误。
当我将依赖项更改为旧版本 (23.1.1
) 时,错误消失了。
现在我们应该等待旧错误的新错误修复。
有一个依赖列表,您应该不更新到23.2.0
以避免这个错误:
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
您还可以使用 workaround 覆盖 SwipeRefreshLayout
这里是 link 到 google bugtracker:RecyclerView v23.2.0 - doesn't play nicely with SwipeRefreshLayout
UPD 08.04.2016:
问题已在库版本 23.3.0
中修复。
这是我通过修复 SwipeRefreshLayout
中的嵌套滚动的解决方案: