LinearLayoutManager layoutManager;
layoutManager = new LinearLayoutManager(getActivity());
		layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
		mRecyclerview.setLayoutManager(layoutManager);

mRecyclerview.addOnScrollListener(new OnScrollListener() { 

            @Override
            public void onScrolled(RecyclerView recyclerView, int dx, int dy) { 
                super.onScrolled(recyclerView, dx, dy);
                int visible  = layoutManager.getChildCount();
                int total = layoutManager.getItemCount(); 
                int past=layoutManager.findFirstCompletelyVisibleItemPosition();
                if ((visible + past) >= total){
                        mType=2;page++;
                        initData(); 
                }
            } 
        });

  

SwipeRefreshLayout 和RecyclerView 使用  

相关文章:

  • 2021-10-21
  • 2022-12-23
  • 2021-11-22
  • 2022-12-23
  • 2021-12-06
  • 2022-02-12
  • 2022-01-22
  • 2021-08-10
猜你喜欢
  • 2021-07-11
  • 2022-01-22
  • 2021-09-25
  • 2021-11-22
  • 2022-12-23
  • 2021-09-17
  • 2022-02-19
相关资源
相似解决方案