回答

10

按照此步驟:

1組嵌套滾動啓用假回收的看法。

recyclerView.setNestedScrollingEnabled(false); 

2.添加滾動聽者嵌套滾動視圖。

mScrollView.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() { 
      @Override 
      public void onScrollChanged() 
      { 
        View view = (View)mScrollView.getChildAt(mScrollView.getChildCount() - 1); 

        int diff = (view.getBottom() - (mScrollView.getHeight() + mScrollView 
            .getScrollY())); 

        if (diff == 0) { 
         // your pagination code 
        } 
      } 
    }); 
+1

謝謝你,它的工作原理! – Jatin

+0

感謝bhai其工作正常 –

+1

對我來說也是如此 – Rajdeep

相關問題