예제 #1
0
  @Override
  public void onReceiveResponse(Response response, Request request, Object tag) {
    super.onReceiveResponse(response, request, tag);
    if (response instanceof GetInquiryFromOtherItemsResponse) {
      dismissProgress();
      ArrayList<GoodsListData> goodListDatas =
          ((GetInquiryFromOtherItemsResponse) response).getGoodListDatas();
      if (nowIndex == 1) {
        adapterLeft.setDatas(goodListDatas);
        mRlvAskPrice.stopRefresh();
        mRlvAskPrice.setAdapter(adapterLeft);

      } else {
        adapterLeft.addDatas(goodListDatas);
        mRlvAskPrice.stopLoadMore();
      }
      nowIndex++;
      isLoading = false;
    } else if (response instanceof GetInquiryFromMeItemResponse) {
      ArrayList<GoodsListDataForAskMe> goodListDatas =
          ((GetInquiryFromMeItemResponse) response).getDataForAskMes();
      if (nowIndex == 1) {
        adapterRight.setDatas(goodListDatas);
        mRlvAskPrice.stopRefresh();

      } else {
        adapterRight.addDatas(goodListDatas);
        mRlvAskPrice.stopLoadMore();
      }
      nowIndex++;
      isLoading = false;
    }
  }
예제 #2
0
 /**
  * 刷新adapter 数据 FoodPopupWindowTwo void
  *
  * @param type 0 左右都刷新 1只刷新左侧adapter 2只刷新右侧adapter
  */
 public void refrush(int type) {
   switch (type) {
     case 0:
       leftAdapter.notifyDataSetChanged();
       rightAdapter.notifyDataSetChanged();
       break;
     case 1:
       leftAdapter.notifyDataSetChanged();
       break;
     case 2:
       rightAdapter.notifyDataSetChanged();
     default:
       break;
   }
 }