use of com.mp.android.apps.main.bookR.adapter.BookRRecommendFRecyclerAdapter in project ManPinAPP by AnyMarvel.
the class BookRRecommendFImpl method notifyRecyclerView.
@Override
public void notifyRecyclerView(List<SourceListContent> recommendList, List<SourceListContent> hotRankingList, List<SourceListContent> contentList, boolean useCache) {
if (useCache || recommendRecyclerAdapter == null) {
recommendRecyclerAdapter = new BookRRecommendFRecyclerAdapter(getContext(), this, recommendList, hotRankingList, contentList);
recommendRecyclerView.setAdapter(recommendRecyclerAdapter);
} else {
recommendRecyclerAdapter.setRecommendList(recommendList);
recommendRecyclerAdapter.setHotRankingList(hotRankingList);
recommendRecyclerAdapter.setContentList(contentList);
recommendRecyclerAdapter.notifyDataSetChanged();
}
bookRrefreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
@Override
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
mPresenter.getNextPageContent(recommendRecyclerAdapter.getmContentListPage() + 1);
}
});
bookRrefreshLayout.setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
mPresenter.initBookRRcommendData();
}
});
bookRrefreshLayout.finishRefresh();
}
Aggregations