use of com.twtstudio.bbs.bdpqchen.bbs.individual.my_release.EndlessRecyclerOnScrollListener in project BBS-Android by bdpqchen.
the class MyReplyFragment method initFragment.
@Override
protected void initFragment() {
myReplyAdapter = new MyReplyAdapter(getActivity(), data);
layoutManager = new LinearLayoutManager(getActivity());
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
rv.setHasFixedSize(true);
rv.setLayoutManager(layoutManager);
rv.setAdapter(myReplyAdapter);
rv.addItemDecoration(new RecyclerViewItemDecoration(5));
srl.setOnRefreshListener(this);
srl.setColorSchemeColors(getResources().getIntArray(R.array.swipeRefreshColors));
eros = new EndlessRecyclerOnScrollListener(layoutManager) {
@Override
public void onLoadMore() {
mPresenter.getMyReplyList();
}
};
rv.addOnScrollListener(eros);
mPresenter.initMyReplyList();
}
Aggregations