use of com.example.jingbin.cloudreader.adapter.DouBanTopAdapter in project CloudReader by youlookwhat.
the class DoubanTopActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_douban_top);
setTitle("豆瓣电影Top250");
mDouBanTopAdapter = new DouBanTopAdapter(DoubanTopActivity.this);
loadDouBanTop250();
bindingView.xrvTop.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
}
@Override
public void onLoadMore() {
mStart += mCount;
loadDouBanTop250();
}
});
}
use of com.example.jingbin.cloudreader.adapter.DouBanTopAdapter in project CloudReader by youlookwhat.
the class DoubanTopActivity method initRecyclerView.
private void initRecyclerView() {
mDouBanTopAdapter = new DouBanTopAdapter(this);
bindingView.xrvTop.setLayoutManager(new StaggeredGridLayoutManager(3, StaggeredGridLayoutManager.VERTICAL));
bindingView.xrvTop.setItemAnimator(null);
bindingView.xrvTop.setAdapter(mDouBanTopAdapter);
mDouBanTopAdapter.setListener((bean, view) -> OneMovieDetailActivity.start(DoubanTopActivity.this, bean, view));
bindingView.xrvTop.setOnLoadMoreListener(new ByRecyclerView.OnLoadMoreListener() {
@Override
public void onLoadMore() {
viewModel.handleNextStart();
loadDouBanTop250();
}
});
}
Aggregations