use of com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout in project SmartCampus by Vegen.
the class LostAndFoundActivity method setupUI.
@Override
protected void setupUI() {
setTitle("失物招领");
lostAndFoundAdapter = new LostAndFoundAdapter();
lostAndFoundAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
RecyclerView.LayoutManager layoutManage = /*new FullyGridLayoutManager(this, 2); // */
new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
recyclerView.setLayoutManager(layoutManage);
recyclerView.setAdapter(lostAndFoundAdapter);
new QuickReturnTopManager(recyclerView);
recyclerView.addItemDecoration(new GridItemDecoration());
View emptyView = View.inflate(this, R.layout.app_view_empty, null);
lostAndFoundAdapter.setEmptyView(emptyView);
lostAndFoundAdapter.setOnLoadMoreListener(() -> {
presenter().getLostList(SKIP, skip);
LogUtils.e("更多更多!!!");
}, recyclerView);
lostAndFoundAdapter.disableLoadMoreIfNotFullPage();
refreshLayout.setEnableLoadmore(false);
refreshLayout.setOnRefreshListener(new RefreshListenerAdapter() {
@Override
public void onRefresh(TwinklingRefreshLayout refreshLayout) {
super.onRefresh(refreshLayout);
loadData();
}
});
}
Aggregations