use of com.itculturalfestival.smartcampus.adapter.EmploymentListAdapter in project SmartCampus by Vegen.
the class EmploymentListActivity method setupUI.
@Override
protected void setupUI() {
type = getIntent().getIntExtra("type", Constant.NOTICE);
title = getIntent().getStringExtra("title");
url = getIntent().getStringExtra("url");
setTitle(title);
refreshLayout.setEnableLoadmore(false);
refreshLayout.setOnRefreshListener(new RefreshListenerAdapter() {
@Override
public void onRefresh(TwinklingRefreshLayout refreshLayout) {
super.onRefresh(refreshLayout);
loadData();
}
});
employmentListAdapter = new EmploymentListAdapter();
employmentListAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
recyclerView.setLayoutManager(linearLayoutManager);
recyclerView.setAdapter(employmentListAdapter);
new QuickReturnTopManager(recyclerView);
recyclerView.addItemDecoration(new ListItemDecoration());
View emptyView = View.inflate(this, R.layout.app_view_empty, null);
employmentListAdapter.setEmptyView(emptyView);
employmentListAdapter.setOnLoadMoreListener(() -> presenter().getEmploymentList(url + page, type), recyclerView);
}
Aggregations