use of com.jsoupsimple.image.imagelist.presenter.ImagePresenterImpl in project AndroidDevelop by 7449.
the class ImageFragment method initData.
@Override
protected void initData() {
if (!isPrepared || !isVisible || isLoad) {
return;
}
recyclerView.setLoadingData(this);
recyclerView.setHasFixedSize(true);
imageListPresenter = new ImagePresenterImpl(this);
swipeRefreshLayout.setOnRefreshListener(this);
recyclerView.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));
adapter = new ImageAdapter(new LinkedList<BaseModel>());
adapter.setOnItemClickListener(this);
recyclerView.setAdapter(adapter);
swipeRefreshLayout.post(new Runnable() {
@Override
public void run() {
onRefresh();
}
});
setLoad();
}
Aggregations