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() {
   refreshLayout.setRefreshing(false);
 }
 /** 刷新(重载)数据 */
 private void refreshData() {
   if (!refreshLayout.isRefreshing()) {
     refreshLayout.setRefreshing(true);
   }
   new GoodsScoreModel().getGoodsScoresByGoodsId(refreshCallback, new Pager(), this.goodsId);
 }