1. Solutions that work for me

Set setOnScrollListener to listView and override its two methods

lvHome.setOnScrollListener(new AbsListView.OnScrollListener() { @Override public void onScrollStateChanged(AbsListView view, Int scrollState) {// Resolve SwipeRefreshLayout nested ListView sliding conflict // Determine whether the ListView slides to the top of the first Itemif(view.getChildCount() > 0 && view.getFirstVisiblePosition() == 0 && view.getChildAt(0).getTop() >= view.getPaddingTop()) {/ / resolve conflict, sliding when sliding to the first item, the drop-down refresh works bindingView. MSwipeLayout. SetEnabled (true);
     } else {
        bindingView.mSwipeLayout.setEnabled(false); }}Copy the code

2. There is another plan on the Internet, but I tried it without any effect

mSwipeLayout.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() {
    @Override
    public void onScrollChanged() { bindingView.mSwipeLayout.setEnabled(bindingView.lvHome.getScrollY() == 0); }});Copy the code