@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;
    }
  }
 @Override
 public void onReceiveResponse(Response response, Request request, Object tag) {
   super.onReceiveResponse(response, request, tag);
   if (response instanceof CheckPassWordResponse) {
     CheckPassWordResponse checkPassWordResponse = (CheckPassWordResponse) response;
     if (checkPassWordResponse.getUpdateState().equals("1")) {
       finish();
       startActivity(new Intent(ChangeBindActivityFirst.this, ChangeBindActivitySecond.class));
     } else {
       showToast(checkPassWordResponse.getUpdateInfo());
     }
   }
 }
Exemple #3
0
  @Override
  public void onReceiveResponse(Response response, Request request, Object tag) {
    // TODO Auto-generated method stub
    super.onReceiveResponse(response, request, tag);
    isLoading = false;
    int index = 0;
    try {
      index = Integer.parseInt(tag.toString());
    } catch (Exception e) {

    }

    if (response instanceof GetOrderListSellResponse) {
      dismissProgress();
      List<Order> list = ((GetOrderListSellResponse) response).getListOrder();
      if (tag.toString().equals(MORE)) {

      } else {
        sellList.clear();
      }
      for (int i = 0; i < list.size(); i++) {
        sellList.add(list.get(i));
      }
      if (list.size() < pageSize) {
        sellOrderListView.setPullLoadEnable(false);
      } else {
        sellOrderListView.setPullLoadEnable(true);
      }
      sellOrderListAdapter.notifyDataSetChanged();
      onLoadBuy();
    } else if (response instanceof GetOrderListBuyResponse) {
      List<Order> list = ((GetOrderListBuyResponse) response).getListOrder();
      if (tag.toString().equals(MORE)) {

      } else {
        buyList.clear();
      }
      for (int i = 0; i < list.size(); i++) {
        buyList.add(list.get(i));
      }
      if (list.size() < pageSize) {
        buyOrderListView.setPullLoadEnable(false);
      } else {
        buyOrderListView.setPullLoadEnable(true);
      }
      buyOrderListAdapter.notifyDataSetChanged();
      onLoadSell();
    } else if (response instanceof FailResponse) {
      onLoadBuy();
      onLoadSell();
    } else if (response instanceof CarArriveResponse) {
      CarArriveResponse r = (CarArriveResponse) response;
      if (r.isResult()) {
        sellList.get(index).setExecuteState(0);
        Log.i("json", "ssssssss");
      }
      sellOrderListAdapter.notifyDataSetChanged();
    } else if (response instanceof CarDepartureResponse) {
      CarDepartureResponse r = (CarDepartureResponse) response;
      if (r.isResult()) {
        sellList.get(index).setExecuteState(2);
      }
      sellOrderListAdapter.notifyDataSetChanged();
    } else if (response instanceof CarDepartureAllowResponse) {
      CarDepartureAllowResponse r = (CarDepartureAllowResponse) response;
      if (r.isResult()) {
        buyList.get(index).setExecuteState(2);
      }
      buyOrderListAdapter.notifyDataSetChanged();
    } else if (response instanceof TransportArriveResponse) {
      TransportArriveResponse r = (TransportArriveResponse) response;
      if (r.isResult()) {
        sellList.get(index).setExecuteState(4);
      }
      sellOrderListAdapter.notifyDataSetChanged();
    } else if (response instanceof SettlementResponse) {
      SettlementResponse r = (SettlementResponse) response;
      if (r.isResult()) {
        sellList.get(index).setExecuteState(6);
        sellOrderListAdapter.notifyDataSetChanged();
      }
    }
  }