📜  recyclerview onscroll listener android - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:56.983000             🧑  作者: Mango

代码示例1
mRecyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() {
            int scrollDy = 0;
            @Override
            public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
                super.onScrollStateChanged(recyclerView, newState);
            }

            @Override
            public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
                scrollDy += dy;
            }
        });