其他分享
首页 > 其他分享> > NestedScrollView 嵌套RecyclerView 判断RecyclerView滑动到最底部,需要分页加载的方法

NestedScrollView 嵌套RecyclerView 判断RecyclerView滑动到最底部,需要分页加载的方法

作者:互联网

 

scroller.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() {
        @Override
        public void onScrollChange(NestedScrollView v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {if (scrollY == (v.getChildAt(0).getMeasuredHeight() - v.getMeasuredHeight())) {
               //到底了
            }
       }
    });

 

标签:scroller,嵌套,int,NestedScrollView,scrollY,getMeasuredHeight,RecyclerView
来源: https://www.cnblogs.com/haihai88/p/10796413.html