标签:
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(); } } });
标签:
原文地址:http://www.cnblogs.com/freexiaoyu/p/5051360.html