SwipeRefreshLayout 、RecyclerView 与 CoordinatorLayout 嵌套刷新滑动冲突的解决办法
SwipeRefreshLayout 与 CoordinatorLayout 嵌套刷新 1.设置 mSwipeRefreshLayout.setOnRefreshListener(this); 2. 动态设置SwipeRefreshLayout的是否可以刷新 setEnable(boolean isEnable); 3. 设置SwipRefreshLayout刷新图标的位置 setProgressViewOffset(true, -20, 100); 4. 监听 AppBarLayout Offset 变化,动态设置 SwipeRefreshLayout 是否可用 appBarLayout = (AppBarLayout) findViewById(R.id.appbar_layout); appBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() { @Override public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) { if (verticalOffset >= 0) { mSwipeRefreshLayout.setEnabled(true); } else {