private void initViews() { adapter = new GoodsScoreAdapter(this); listView.setAdapter(adapter); listView.setOnLoadMoreListener( new OnLoadMoreListener() { @Override public boolean checkCanDoLoad() { return pageData != null && pageData.hasNextPage() && !refreshLayout.isRefreshing(); } @Override public void onStartLoad() { loadMoreData(); } }); refreshLayout.setOnRefreshListener( new SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { refreshData(); } }); }
@Override public void onFinished() { listView.loadComplete(); }