Android APPbarlayout与SwipeRefreshLayout刷新滑动冲突解决
appbarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {
@Override
public void onOffsetChanged(AppBarLayout appBarLayout, final int verticalOffset) {
mSwipeRefreshLayout.setEnabled(verticalOffset >= 0);//页面滑动到顶部,才可以下拉刷新
}
});